Skip to content

Commit cb6026e

Browse files
committed
ci: add ci
1 parent 225a5b0 commit cb6026e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/gh-pages.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: nightly
24+
target: wasm32-unknown-unknown
25+
override: true
26+
27+
- name: Install Trunk
28+
run: wget -qO- https://github.com/thedodd/trunk/releases/download/v0.17.5/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
29+
# https://github.com/thedodd/trunk#install
30+
31+
- name: Build
32+
run: |
33+
npm i
34+
./trunk build
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v1
37+
with:
38+
path: ./dist
39+
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)