Skip to content

Commit

Permalink
Add gh-pages workflow
Browse files Browse the repository at this point in the history
Add devcontainer upddate package.json to reflect the requirements:

* node 8 due to rollup-plugin-commonjs error with node >= 10:
  "The argument 'path' must be a string or Uint8Array without null bytes"
* npm >= 4 due to npm/cli#681
  • Loading branch information
nathanweeks committed Jun 11, 2022
1 parent 6bf11a4 commit 3766a2c
Show file tree
Hide file tree
Showing 5 changed files with 7,725 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
ARG VARIANT="ubuntu-18.04"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# need node <10, but npm newer than 3.x to work around
# install newer npm to work https://github.com/npm/cli/issues/681
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends npm \
&& npm install -g npm@6 \
&& rm -rf /var/lib/apt/lists/*


20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": { "VARIANT": "ubuntu-18.04" }
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
26 changes: 26 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- 'pin-node-8'

jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-node@v3
with:
node-version: 8

- run: npm ci
- run: npm run build
- run: mkdir public && mv build cmap.json config data images index.html public/

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: 'legumfederation.github.io/cmap-js'
Loading

0 comments on commit 3766a2c

Please sign in to comment.