File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main # or master, if that’s your default branch
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+
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 : 20
26+ cache : " npm"
27+
28+ - name : Install dependencies
29+ run : npm ci
30+
31+ - name : Generate static site (Nuxt/Docus)
32+ env :
33+ # VERY IMPORTANT for GitHub Pages: base path = /<repo-name>/
34+ NUXT_APP_BASE_URL : /laravel-rest-api-flutter-doc/
35+ NITRO_PRESET : github-pages
36+ run : npx nuxi generate
37+
38+ - name : Upload GitHub Pages artifact
39+ uses : actions/upload-pages-artifact@v3
40+ with :
41+ path : .output/public
42+
43+ deploy :
44+ runs-on : ubuntu-latest
45+ needs : build
46+ environment :
47+ name : github-pages
48+ url : ${{ steps.deployment.outputs.page_url }}
49+
50+ steps :
51+ - name : Deploy to GitHub Pages
52+ id : deployment
53+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments