File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Build and Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - 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 : true
17+
18+ jobs :
19+ build :
20+ name : Build on ${{ matrix.os }}
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Git Checkout
24+ uses : actions/checkout@v3
25+
26+ - name : Set up Node.js
27+ uses : actions/setup-node@v3
28+ with :
29+ node-version-file : ' .nvmrc'
30+ cache : npm
31+
32+ - name : Install NPM packages
33+ run : npm ci
34+
35+ - name : Setup GitHub Pages
36+ uses : actions/configure-pages@v3
37+ with :
38+ static_site_generator : next
39+
40+ - name : Restore Next.js cache
41+ uses : actions/cache/restore@v3
42+ with :
43+ path : |
44+ .next/cache
45+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
46+
47+ - name : Build Next.js
48+ run : npm run build
49+ env :
50+ NODE_OPTIONS : ' --max_old_space_size=4096'
51+
52+ - name : Save Next.js cache
53+ uses : actions/cache/save@v3
54+ with :
55+ path : |
56+ .next/cache
57+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.next/cache/eslint') }}
58+
59+ - name : Export Next.js static files
60+ run : npm run export
61+
62+ - name : Upload Artifact
63+ uses : actions/upload-pages-artifact@v1
64+ with :
65+ path : ./build
66+
67+ deploy :
68+ name : Deploy to GitHub Pages
69+ environment :
70+ name : github-pages
71+ url : ${{ steps.deployment.outputs.page_url }}
72+ runs-on : ubuntu-latest
73+ needs : build
74+ steps :
75+ - name : Deploy to GitHub Pages
76+ id : deployment
77+ uses : actions/deploy-pages@v1
Original file line number Diff line number Diff line change 1+ name : Pull Request Checks
2+
3+ on :
4+ pull_request :
5+ workflow_dispatch :
6+ merge_group :
7+
8+ env :
9+ FORCE_COLOR : 2
10+
11+ jobs :
12+ lint :
13+ name : Lint on ${{ matrix.os }}
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Git Checkout
18+ uses : actions/checkout@v3
19+
20+ - name : Set up Node.js
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version-file : ' .nvmrc'
24+ cache : npm
25+
26+ - name : Install NPM packages
27+ run : npm ci
28+
29+ - name : Run Linting
30+ run : npm run lint
31+
32+ build :
33+ name : Build on ${{ matrix.os }}
34+ runs-on : ${{ matrix.os }}
35+
36+ strategy :
37+ fail-fast : false
38+ matrix :
39+ os : [ubuntu-latest, windows-latest]
40+
41+ steps :
42+ - name : Git Checkout
43+ uses : actions/checkout@v3
44+
45+ - name : Set up Node.js
46+ uses : actions/setup-node@v3
47+ with :
48+ node-version-file : ' .nvmrc'
49+ cache : npm
50+
51+ - name : Install NPM packages
52+ run : npm ci
53+
54+ - name : Restore Next.js cache
55+ uses : actions/cache/restore@v3
56+ with :
57+ path : |
58+ ${{ github.workspace }}/.next/cache
59+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
60+
61+ - name : Build Next.js
62+ run : npm run build
63+ env :
64+ NODE_OPTIONS : ' --max_old_space_size=4096'
65+
66+ - name : Save Next.js cache
67+ uses : actions/cache/save@v3
68+ with :
69+ path : |
70+ ${{ github.workspace }}/.next/cache
71+ key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.next/cache/eslint') }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments