File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ name : studio-nuxt-build
3+ run-name : studio nuxt build
4+
5+ on :
6+ # Runs on pushes targeting the default branch
7+ push :
8+ branches :
9+ - ' v3'
10+
11+ # Allows you to run this workflow manually from the Actions tab
12+ workflow_dispatch :
13+
14+ # Add write workflow permissions
15+ permissions :
16+ contents : write
17+
18+ # Allow one concurrent deployment
19+ concurrency :
20+ group : " pages"
21+ cancel-in-progress : true
22+
23+ jobs :
24+ # Build job
25+ build-and-deploy :
26+ runs-on : ${{ matrix.os }}
27+ defaults :
28+ run :
29+ working-directory : .
30+
31+ strategy :
32+ matrix :
33+ os : [ubuntu-latest]
34+ node : [20]
35+
36+ steps :
37+ - name : Checkout
38+ uses : actions/checkout@v4
39+
40+ - name : Identify package manager
41+ id : pkgman
42+ run : |
43+ cache=`[ -f "./pnpm-lock.yaml" ] && echo "pnpm" || ([ -f "./package-lock.json" ] && echo "npm" || ([ -f "./yarn.lock" ] && echo "yarn" || echo ""))`
44+ package_manager=`[ ! -z "$cache" ] && echo "$cache" || echo "pnpm"`
45+ echo "cache=$cache" >> $GITHUB_OUTPUT
46+ echo "package_manager=$package_manager" >> $GITHUB_OUTPUT
47+
48+ - uses : pnpm/action-setup@v4
49+ if : ${{ steps.pkgman.outputs.package_manager == 'pnpm' }}
50+ name : Install pnpm
51+ id : pnpm-install
52+
53+ - uses : actions/setup-node@v4
54+ with :
55+ version : ${{ matrix.node }}
56+ cache : ${{ steps.pkgman.outputs.cache }}
57+
58+ - name : Install dependencies
59+ run : ${{ steps.pkgman.outputs.package_manager }} install
60+
61+ - name : Generate
62+ run : npx nuxi build --preset github_pages
63+ env :
64+ NUXT_CONTENT_PREVIEW_API : https://api.nuxt.studio
65+
66+
67+ # Deployment job
68+ - name : Deploy 🚀
69+ uses : JamesIves/github-pages-deploy-action@v4
70+ with :
71+ folder : ./.output/public
You can’t perform that action at this time.
0 commit comments