-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.29 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
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Build project
run: |
pnpm build
- name: Ensure correct permission
run: |
chmod -v -R +rX "build" | while read line; do
echo "::notice title=Ensuring correct permission::$line"
done
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: build
deploy:
needs: build
# Set up proper permission for deploying to GitHub Pages
permissions:
pages: write
id-token: write
# Set up correct environment for deploying to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v2