Skip to content

Commit e34075b

Browse files
authored
Why oh why has my deploy action disappeared??
1 parent ae955eb commit e34075b

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

0 commit comments

Comments
 (0)