Skip to content

Commit ae80cab

Browse files
committed
update pages-cd
1 parent 221f334 commit ae80cab

2 files changed

Lines changed: 22 additions & 25 deletions

File tree

.github/workflows/pages-cd.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,51 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy
22

33
on:
44
push:
55
branches:
66
- main
77

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
13-
concurrency:
14-
group: 'pages'
15-
cancel-in-progress: true
16-
178
jobs:
189
build:
10+
name: Build
1911
runs-on: ubuntu-latest
2012

2113
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v3
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
2416

25-
- name: Setup Node.js (Latest LTS)
26-
uses: actions/setup-node@v3
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
2719
with:
2820
node-version: 'lts/*'
2921

3022
- name: Install dependencies
31-
run: npm ci
23+
uses: bahmutov/npm-install@v1
3224

3325
- name: Build project
3426
run: npm run build
3527

36-
- name: Upload build output
37-
uses: actions/upload-pages-artifact@v3
28+
- name: Upload production-ready build files
29+
uses: actions/upload-artifact@v4
3830
with:
31+
name: production-files
3932
path: ./dist
4033

4134
deploy:
42-
runs-on: ubuntu-latest
35+
name: Deploy
4336
needs: build
44-
environment:
45-
name: github-pages
46-
url: ${{ steps.deployment.outputs.page_url }}
37+
runs-on: ubuntu-latest
38+
if: github.ref == 'refs/heads/main'
4739

4840
steps:
49-
- name: Download build output
50-
uses: actions/download-pages-artifact@latest
41+
- name: Download artifact
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: production-files
45+
path: ./dist
5146

5247
- name: Deploy to GitHub Pages
53-
id: deployment
54-
uses: actions/deploy-pages@v4
48+
uses: peaceiris/actions-gh-pages@v4
5549
with:
5650
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
publish_dir: ./dist

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
".vscode/css_custom_data.json"
44
],
55
"cSpell.words": [
6+
"bahmutov",
67
"fontawesome",
78
"fortawesome",
89
"headlessui",
910
"heroicons",
1011
"intlify",
12+
"peaceiris",
1113
"tailwindcss"
1214
]
1315
}

0 commit comments

Comments
 (0)