Skip to content

deploy brgen-web

deploy brgen-web #909

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy brgen-web to GitHub Pages
run-name: deploy brgen-web
on: push
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages-${{github.ref_name}}
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
build_pages:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Timeline
uses: Kesin11/actions-timeline@b03a6aa289adef5534c84ccb6fbef7c975973574 # v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
- name: Set up Ninja
uses: seanmiddleditch/gha-setup-ninja@8b297075da4cd2a5f1fd21fe011b499edf06e9d2 # master
- name: Set up ast2ts
run: |
cd ast2ts
npm install
tsc
cd ..
- name: Set up wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build Wasm
run: |
GOROOT=`go env GOROOT`
echo "GOROOT=$GOROOT"
export WASMEXEC_FILE="$GOROOT/misc/wasm/wasm_exec.js"
export WEB_PRODUCTION="production"
. build.sh wasm-em Release
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
with:
hugo-version: "latest"
extended: true
- name: Build Hugo
run: |
cd web/doc
hugo --minify
cd ../..
- name: Upload artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: web
path: "./web/public"
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build_pages
timeout-minutes: 10
steps:
- name: Timeline
uses: Kesin11/actions-timeline@b03a6aa289adef5534c84ccb6fbef7c975973574 # v2.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifact
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: web
path: "./web/public"
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
# Upload entire repository
path: "./web/public"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5