File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Deploy GitHub Pages'
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Perform Checkout
14+ uses : actions/checkout@v3
15+
16+ - name : Insert Git Hash
17+ run : |
18+ rm src/lib/GIT_VERSION.ts
19+ git rev-parse HEAD | awk '{printf("export const GIT_VERSION: string | null = \"%s\"", $0)}' >> src/lib/GIT_VERSION.ts
20+
21+ - name : Use Node.js
22+ uses : actions/setup-node@v3
23+ with :
24+ node-version : ' 22.x'
25+ cache : ' npm'
26+
27+ - name : Install
28+ run : npm install
29+
30+ - name : Build
31+ run : npm run build
32+
33+ - name : Deploy
34+ uses : peaceiris/actions-gh-pages@v3
35+ with :
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ publish_dir : ./build
38+ publish_branch : gh-pages
You can’t perform that action at this time.
0 commit comments