release-notification #138
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: Deploy | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- "LICENSE_**" | |
- ".pre-commit-config.yaml" | |
repository_dispatch: | |
types: [release-notification] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
deploy: | |
runs-on: macos-latest | |
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
contents: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Setup | |
run: | | |
rustup update stable | |
# cargo install wasm-pack | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Update | |
run: | | |
cargo update | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Automatic update \`Cargo.lock\`" | |
git push | |
- name: Build | |
run: | | |
npm run full-build || (cargo clean | npm run full-build) | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: dist | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |