File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI/CD
2+
3+ on :
4+ push :
5+ branches : [ master, dev ]
6+ pull_request :
7+ branches : [ master, dev ]
8+
9+ workflow_dispatch :
10+
11+ jobs :
12+ build :
13+ name : Build
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+
23+ - name : Run install
24+ run : npm install
25+
26+ - name : Build site
27+ run : npm run build
28+
29+ - name : Upload artifact
30+ uses : actions/upload-pages-artifact@v3
31+ with :
32+ path : " _site/"
33+
34+ deploy :
35+ name : Deploy
36+ runs-on : ubuntu-latest
37+ needs : build
38+ if : github.ref == 'refs/heads/master' # Only deploy on push to master
39+
40+ permissions :
41+ pages : write
42+ id-token : write
43+
44+ environment :
45+ name : github-pages
46+ url : ${{ steps.deployment.outputs.page_url }}
47+
48+ steps :
49+ - name : Deploy to GitHub Pages
50+ id : deployment
51+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments