-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (48 loc) · 1.38 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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