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+ # Inspired from https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
2+ name : GitHub Pages
3+
4+ on :
5+ push :
6+ branches : main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : ' pages'
16+ cancel-in-progress : false
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20'
26+ cache : yarn
27+ - id : configurepages
28+ uses : actions/configure-pages@v5
29+ - name : Restore cache
30+ uses : actions/cache@v4
31+ with :
32+ path : .next/cache
33+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
34+ restore-keys : |
35+ ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
36+ - run : yarn
37+ - run : yarn build
38+ env :
39+ EXPORT : 1
40+ UNOPTIMIZED : 1
41+ BASE_PATH : ${{ steps.configurepages.outputs.base_path }}
42+ - uses : actions/upload-pages-artifact@v3
43+ with :
44+ path : ./out
45+
46+ # Deployment job
47+ deploy :
48+ environment :
49+ name : github-pages
50+ url : ${{ steps.deployment.outputs.page_url }}
51+ runs-on : ubuntu-latest
52+ needs : build
53+ steps :
54+ - id : deployment
55+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments