Skip to content

Commit 3766a2c

Browse files
committed
Add gh-pages workflow
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
1 parent 6bf11a4 commit 3766a2c

File tree

5 files changed

+7725
-0
lines changed

5 files changed

+7725
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/ubuntu/.devcontainer/base.Dockerfile
2+
3+
# [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
4+
ARG VARIANT="ubuntu-18.04"
5+
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
6+
7+
# need node <10, but npm newer than 3.x to work around
8+
# install newer npm to work https://github.com/npm/cli/issues/681
9+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
10+
&& apt-get -y install --no-install-recommends npm \
11+
&& npm install -g npm@6 \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
8+
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
9+
"args": { "VARIANT": "ubuntu-18.04" }
10+
},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Use 'postCreateCommand' to run commands after the container is created.
16+
// "postCreateCommand": "uname -a",
17+
18+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
19+
"remoteUser": "vscode"
20+
}

.github/workflows/gh-pages.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
branches:
4+
- 'pin-node-8'
5+
6+
jobs:
7+
github-pages:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
submodules: recursive
13+
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 8
17+
18+
- run: npm ci
19+
- run: npm run build
20+
- run: mkdir public && mv build cmap.json config data images index.html public/
21+
22+
- uses: peaceiris/actions-gh-pages@v3
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: ./public
26+
publish_branch: 'legumfederation.github.io/cmap-js'

0 commit comments

Comments
 (0)