This repository was archived by the owner on Apr 17, 2025. It is now read-only.
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 : Build and Publish
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : ["master"]
7+ paths-ignore :
8+ - " .github/**"
9+ - " !.github/workflows/**"
10+ pull_request :
11+ branches : ["master"]
12+
13+ jobs :
14+ Build :
15+ runs-on : ubuntu-latest
16+ steps :
17+ # ---
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+ # ---
21+ - name : Setup NodeJS
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+ cache : " npm"
26+ cache-dependency-path : package-lock.json
27+ # ---
28+ - name : Install
29+ id : install-step
30+ run : |
31+ npm ci --cache npm --prefer-offline
32+ # ---
33+ - name : Build
34+ id : build-step
35+ run : |
36+ npx nuxt build --preset github_pages
37+ # ---
38+ - name : Upload artifact
39+ uses : actions/upload-pages-artifact@v3
40+ with :
41+ path : ./.output/public
42+
43+ Publish :
44+ runs-on : ubuntu-latest
45+ if : github.ref == 'refs/heads/master'
46+ needs : build
47+ permissions :
48+ pages : write
49+ id-token : write
50+ environment :
51+ name : github-pages
52+ url : ${{ steps.deployment.outputs.page_url }}
53+ steps :
54+ # ---
55+ - name : Publish to GitHub Pages
56+ id : deployment
57+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments