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+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ deploy :
11+ runs-on : ubuntu-22.04
12+ permissions :
13+ contents : write
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.ref }}
16+ steps :
17+ - uses : actions/checkout@v3
18+
19+ - name : Setup Node
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : " 18"
23+
24+ - name : Persist npm cache
25+ uses : actions/cache@v3
26+ with :
27+ path : ~/.npm
28+ key : ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
29+
30+ - name : Persist Eleventy .cache
31+ uses : actions/cache@v3
32+ with :
33+ path : ./.cache
34+ key : ${{ runner.os }}-eleventy-fetch-cache
35+
36+ - name : Install dependencies
37+ run : npm install
38+
39+ - name : Build site
40+ run : npm run build-ghpages
41+ env :
42+ TZ : America/New_York
43+
44+ - name : Deploy
45+ uses : peaceiris/actions-gh-pages@v3
46+ if : github.ref == 'refs/heads/main'
47+ with :
48+ github_token : ${{ secrets.GITHUB_TOKEN }}
49+ publish_dir : ./out
50+ publish_branch : gh-pages # default, but being explicit is nice
51+ enable_jekyll : false # writes .nojekyll so assets aren’t hidden
You can’t perform that action at this time.
0 commit comments