Skip to content

CD

CD #12

Workflow file for this run

name: CD
on:
workflow_run:
workflows:
- CI
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Setup Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install Trunk
uses: jetli/[email protected]
with:
version: 'latest'
- uses: jetli/[email protected]
- name: Build
run: trunk build --release --public-url /me/
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
- name: Deploy
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}