-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (39 loc) · 877 Bytes
/
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
name: build
on:
push:
branches:
- main
permissions:
contents: write
jobs:
cleanup:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: clean deployment
uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.TOKEN }}
environment: github-pages
onlyRemoveDeployments: true
build-pages:
runs-on: ubuntu-latest
needs: cleanup
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Load Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: install
run: npm install
- name: build
run: npm run deploy
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist