File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+
11+ concurrency :
12+ group : pages-deploy
13+ cancel-in-progress : true
14+
15+ jobs :
16+ build-and-deploy :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Node
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : 18
26+
27+ - name : Install dependencies
28+ run : npm install
29+
30+ - name : Build
31+ run : npm run build
32+
33+ - name : Copy static files into dist
34+ run : |
35+ cp robots.txt dist/robots.txt
36+ cp manifest.json dist/manifest.json
37+
38+ - name : Deploy to gh-pages
39+ uses : peaceiris/actions-gh-pages@v4
40+ with :
41+ github_token : ${{ secrets.GITHUB_TOKEN }}
42+ publish_dir : ./dist
43+ publish_branch : gh-pages
You can’t perform that action at this time.
0 commit comments