Skip to content

Deploy static content to Pages #99

Deploy static content to Pages

Deploy static content to Pages #99

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
workflow_run:
workflows: [ "Linux Bazel", "Linux WASM" ]
branches: [ master ]
types:
- completed
# 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:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Install
run: sudo apt-get install doxygen graphviz
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
# Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed
# Required, if the artifact is from a different repo
# Required, if the repo is private a Personal Access Token with `repo` scope is needed or GitHub token in a job where the permissions `action` scope set to `read`
github_token: ${{secrets.GITHUB_TOKEN}}
# Optional, workflow file name or ID
# If not specified, will be inferred from run_id (if run_id is specified), or will be the current workflow
workflow: linux_bazel.yml
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion:
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Use the empty string ("") to ignore status or conclusion in the search
workflow_conclusion: success
branch: master
event: push
name: linux-pscm-wasm
repo: ${{ github.repository }}
- name: Check linux-pscm-wasm
run: ls -lha
- name: Download artifact
id: download-artifact-krabby-wasm
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: linux_wasm.yml
workflow_conclusion: success
branch: master
event: push
name: linux-krabby-wasm
repo: ${{ github.repository }}
- name: Check linux-krabby-wasm
run: ls -lha
- name: Yarn Install
run: yarn install
working-directory: ${{github.workspace}}
- name: Build Website
run: yarn docs:build
working-directory: ${{github.workspace}}
- name: Copy wasm files
run: |
cp pscm.js docs/public
cp pscm.wasm docs/public
cp wasm/demo.html docs/public
mkdir -p docs/public/project/krabby
cp index.html docs/public/project/krabby
cp krabby.data docs/public/project/krabby
cp krabby.js docs/public/project/krabby
cp krabby.wasm docs/public/project/krabby
cp -r icon docs/public/project/krabby
cp -r images docs/public/project/krabby
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'docs/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1