-
Notifications
You must be signed in to change notification settings - Fork 0
Build and Deploy Cress Via GitHub Pages
To manage the various dependencies and resources, Cress needs to be built by webpack.
The configurations for building Cress locally can be found in webpack.config.js
. http-server
is used as a lightweight static HTTP server to run Cress web app locally. The root of the server is located at deployment/server/
. To build and start Cress locally, run:
yarn build && yarn start
You can access Cress via port 9000
.
Note: if changes are not updated, run yarn cache clean
to clean cache, and do Empty Cache and Hard Reload
in inspect mode in Chrome.
Cress is hosted on GitHub pages. webpack.pages-config.js
contains the configurations for building Cress for GitHub pages. Note that GitHub pages fetch resources at the root level, not {hostname}/Cress/
, so the asset path and output path has to be set to /Cress/Cress-gh/
.
To update GitHub Pages:
- From
main
branch with the latest updates, bundle Cress by running
yarn bundle:pages
The output will be saved to /gh-pages/Cress/Cress-gh/
.
-
Copy
/gh-pages/Cress/Cress-gh/
folder and store it outside of the Cress repository -
Switch to
gh-pages
branch by running
git checkout gh-pages
-
Replace folder
Cress-gh
at the root level with the new folder -
Commit and push changes
If developing .html
files, make sure to also update
index.html
dashboard.html
editor.html