Publish: GitHub Pages #255
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample workflow for building and deploying a Jekyll site to GitHub Pages | |
name: "Publish: GitHub Pages" | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./doc/gh-pages/ | |
destination: ./_site | |
- name: Demo Build | |
run: | | |
sudo apt install clang-14 lld-14 llvm-14 libjs-d3 python3-numpy | |
sudo apt install llvm -y | |
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
git clone https://github.com/acornjs/acorn.git | |
cd acorn ; npm install ; cd - | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk ; ./emsdk install latest ; cd - | |
# wget --no-verbose -c http://archive.ubuntu.com/ubuntu/pool/universe/e/emscripten/emscripten_3.1.6~dfsg-5_all.deb | |
# sudo apt install -f ./emscripten_3.1.6~dfsg-5_all.deb nodejs- node-acorn- # ignore nodejs acorn max version | |
cd emsdk ; ./emsdk activate latest ; source ./emsdk_env.sh ; cd - | |
emcc -v | |
make all jsweb | |
cp src/js/index.html /github/workspace/./_site/demo.html | |
cp gnoll.bundle.js /github/workspace/./_site/gnoll.bundle.js | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |