Publish Xipher Web #50
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
name: Publish Xipher Web | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
ref: | |
type: string | |
description: 'The branch, tag or SHA of shibme/xipher to publish' | |
default: ${{ github.ref }} | |
jobs: | |
pages: | |
name: Deploy Xipher Web to GitHub Pages | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: shibme/xipher | |
ref: ${{ inputs.ref }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: npm -C web ci | |
- name: Build Xipher Web | |
run: npm -C web run build | |
- name: Download wasm files from latest release | |
uses: robinraju/[email protected] | |
with: | |
repository: shibme/xipher | |
latest: true | |
fileName: '*wasm*' | |
- name: Add WASM files to build directory | |
run: | | |
mkdir -p web/build/wasm | |
unzip xipher_js_wasm.zip -d web/build/wasm/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact from web/build | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: web/build | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |