Skip to content

Commit 07ed8ab

Browse files
committed
deploy gh-pages
1 parent 19eb8c4 commit 07ed8ab

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: 'main'
6+
7+
jobs:
8+
build_site:
9+
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: ./website/
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
# If you're using pnpm, add this step then change the commands and cache key below to use `pnpm`
18+
# - name: Install pnpm
19+
# uses: pnpm/action-setup@v2
20+
# with:
21+
# version: 8
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 18
27+
cache: yarn
28+
cache-dependency-path: '**/yarn.lock'
29+
30+
- run: corepack enable
31+
- name: Install dependencies
32+
run: yarn install
33+
34+
- name: build
35+
env:
36+
BASE_PATH: '/${{ github.event.repository.name }}'
37+
run: |
38+
yarn run build
39+
40+
- name: Upload Artifacts
41+
uses: actions/upload-pages-artifact@v2
42+
with:
43+
# this should match the `pages` option in your adapter-static options
44+
path: './website/build/'
45+
46+
deploy:
47+
needs: build_site
48+
runs-on: ubuntu-latest
49+
50+
permissions:
51+
pages: write
52+
id-token: write
53+
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
58+
steps:
59+
- name: Deploy
60+
id: deployment
61+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)