Skip to content

build-pages

build-pages #14

Workflow file for this run

name: build-pages
# 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"
cancel-in-progress: false
on:
workflow_dispatch:
inputs:
wasmreleasetag:
description: 'wasm_release_tag'
required: true
default: build_wasm_2239522285fe7609dfeedb0f5474cc7753408486_6523319742_1
jobs:
build-pages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- run: |
mkdir -p build/wasm/
cd build/wasm/
wget https://github.com/bnw/busytex-async/releases/download/${{ github.event.inputs.wasmreleasetag }}/busytex.wasm
wget https://github.com/bnw/busytex-async/releases/download/${{ github.event.inputs.wasmreleasetag }}/busytex.js
cd ../../
- run: cd $GITHUB_WORKSPACE && npm install && npm run build
- run: |
mkdir pages
cd $GITHUB_WORKSPACE/pages
mkdir -p example
cp ../example/* example/
mkdir -p build/wasm/
cp ../build/wasm/busytex.wasm ../build/wasm/busytex.js build/wasm/
mkdir -p build-js/src/
cp ../build-js/src/BusytexAsync.browser.js build-js/src/
mkdir -p typescript/test/assets
cp ../typescript/test/assets/* typescript/test/assets/
- uses: actions/upload-pages-artifact@v2
with:
path: pages
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-pages
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2