File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy to GitHub Pages
2+
23on :
34 # Runs on pushes targeting the default branch
45 push :
56 branches : ["main"]
7+
68 # Allows you to run this workflow manually from the Actions tab
79 workflow_dispatch :
10+
811# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
912permissions :
1013 contents : read
1114 pages : write
1215 id-token : write
16+
1317# Allow only one concurrent deployment
1418concurrency :
1519 group : " pages"
1620 cancel-in-progress : true
21+
1722jobs :
1823 # Build job
1924 build :
@@ -27,17 +32,21 @@ jobs:
2732 with :
2833 node-version : " 20"
2934 cache : npm
35+ cache-dependency-path : ./my-portfolio/package-lock.json
3036
3137 - name : Install dependencies
38+ working-directory : ./my-portfolio
3239 run : npm ci
3340
3441 - name : Build with Next.js
42+ working-directory : ./my-portfolio
3543 run : npm run build
3644
3745 - name : Upload artifact
3846 uses : actions/upload-pages-artifact@v3
3947 with :
40- path : ./out
48+ path : ./my-portfolio/out
49+
4150 # Deployment job
4251 deploy :
4352 environment :
You can’t perform that action at this time.
0 commit comments