Skip to content

Github Pages

Max Zhang edited this page Aug 2, 2022 · 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.

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, make sure to also to update index.html and dashboard.html 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.