Skip to content

wgnhs/data-pres-2018

Repository files navigation

data-pres-2018

simple web map for our Borehole Geophysical Logs and Sediment Core data viewer.

Web map is live here: https://wgnhs.github.io/data-pres-2018/

Development

This project requires NodeJS 8+ installed on your development system. We recommend using the latest LTS version. Recommended workflow is

  • fork the project to your personal github account
  • clone your personal repository (inherently naming the remote as origin)
  • set the canonical repository as the upstream remote: git remote add upstream [email protected]:wgnhs/data-pres-2018.git

Setup

npm ci

After cloning the repository, bring up a terminal in the repository's root directory and run npm ci to download the dependencies.

Running

npm start

The npm start command is configured to build the project, then serve the project at http://localhost:8080/data-pres-2018/

The server will watch for source changes and automatically refresh the browser.

Building

npm run build

The distributable folder dist/ can be generated by runnning npm run build

Publishing to GitHub Pages

Code is published to Github pages automatically after merging a pull request to the master branch via a Github Action deploy-pages

NOTE It's not possible to push code directly to the master branch of this repository due to branch protection rules. You must push changes to a new branch and merge to master using a pull request.

  1. On your local machine, checkout the master branch and pull the latest code

     git checkout master
     git pull origin master
    
  2. On your local machine, checkout a new working branch

     git checkout -b my-feature-branch
    
  3. Make your code changes, then add, commit and push them to your working branch

     git add 
     git commit -m "update abc for xyz reason"
     git push origin my-feature-branch
    
  4. Sign into Github and navigate to this repository https://github.com/wgnhs/data-pres-2018

  5. Click Pull requests then New pull requests (or go to https://github.com/wgnhs/data-pres-2018/compare)

  6. Leave base:master, set compare to your working branch, ex compare;my-feature-branch and click Create pull request

  7. Add any additional comments in the Description box click Create pull request

  8. Click Merge pull request, then click Confirm merge

  9. After the pull request is successfully merged, the deploy-pages action will be trigged. This action builds the code and pushes it to the gh-pages branch. Follow progress in https://github.com/wgnhs/data-pres-2018/actions .

  10. After the code is pushed to the gh-pages branch by the deploy-pages action, Github automatically triggers a built-in action pages-build-deployment to publish the code to https://wgnhs.github.io/data-pres-2018 . Progress of this action also appears https://github.com/wgnhs/data-pres-2018/actions .

The deploy-pages action performs the following tasks:

  1. Checkout the master branch of the repository with actions/checkout@v4
  2. Set up NodeJS with actions/setup-node@v4
  3. Install dependencies with npm ci
  4. Build the project with npm run build
  5. Log into Github with the default Github actions account github-actions[bot]
  6. Commit and push the dist/ dir to the gh-pages branch using npm run pages

Releasing

This does not appear to be used as of 8/27/2025

npm run release

The command will:

  • install dependencies
  • run a fresh build
  • version to the next patch version
  • push the newly created commit and tag to remote upstream
  • push ghpages content to remote upstream