Skip to content

Commit a264e2e

Browse files
committed
fix: update to v4 of deploy process
1 parent 63c228d commit a264e2e

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ jobs:
1111

1212
steps:
1313
- name: 📥 Checkout code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: 🟢 Set up Node.js 22
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
1919
node-version: '22'
2020

21+
- name: ♻️ Cache npm
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
2129
- name: 📦 Install dependencies
2230
run: npm ci
2331

@@ -27,12 +35,12 @@ jobs:
2735
- name: 🛠️ Build project
2836
run: npm run build
2937

30-
- name: 🛑 Disable Jekyll
38+
- name: 🛑 Disable Jekyll (for GitHub Pages)
3139
run: echo > dist/.nojekyll
3240

3341
- name: 🚀 Deploy to GitHub Pages
34-
if: success()
35-
uses: peaceiris/actions-gh-pages@v3
42+
if: success() && github.ref == 'refs/heads/master'
43+
uses: peaceiris/actions-gh-pages@v4
3644
with:
3745
github_token: ${{ secrets.GITHUB_TOKEN }}
3846
publish_dir: ./dist

0 commit comments

Comments
 (0)