Skip to content

Github Pages

Yinan Zhou edited this page May 15, 2024 · 5 revisions

Updating Github Pages

Architecture

In develop

When running locally (post v5.X.X), http-server is used as a lightweight static HTTP server to run the Neon web app. The root of the server is located at deployment/server/.

index.html is served as the default homepage and consequently {page}.html contains other pages. Scripts and other required assets are contained in server/Neon-gh/.

NOTE: Neon-gh is built by webpack from typescript files contained outside of server, so it is built by the developer when needed and as such is in .gitignore. Run build steps.

The hosted site can be found at localhost:8080.

In gh-pages

Intentionally, the server directory in the develop branch is a one-to-one reflection of gh-pages, which is where Github Pages uses to build and deploy. The difference is that on Github Pages fetching resources points to {hostname}/ not {{hostname}/Neon/, so the asset location has be changed to /Neon/Neon-gh/.

Instructions For Updating Neon

  1. From the develop branch with the latest updates, yarn bundle:pages.
  2. Copy the dist/Neon/Neon-gh/ directory and store outside of the Neon repository.
  3. In Neon, git checkout gh-pages.
  4. Replace the Neon-gh/ in the root with the new folder.
  5. Commit and push changes.

If developing the index page, the dashboard page, or the sample files, make sure to also to update

  • index.html
  • dashboard.html
  • css/*.css
  • samples/ in the root of gh-pages.

Note: Several folders/files will carry over to the gh-pages branch from the develop branch. These are included in the .gitignore as not to push redundant files, but makes going from one branch to another easier.