Skip to content

Commit b170a65

Browse files
committed
update code
1 parent 83b591a commit b170a65

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

.github/workflows/deploy.yaml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,48 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: [master] # Or 'main' if that’s your default
6-
workflow_dispatch:
5+
branches: [master] # or 'master' if your default branch is named master
76

87
permissions:
98
contents: read
109
pages: write
1110
id-token: write
12-
actions: read
13-
14-
concurrency:
15-
group: "pages"
16-
cancel-in-progress: true
1711

1812
jobs:
1913
build:
2014
runs-on: ubuntu-latest
15+
2116
steps:
22-
- name: Checkout your repository
23-
uses: actions/checkout@v3
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
2419

2520
- name: Setup Node.js
26-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2722
with:
28-
node-version: 18
23+
node-version: 20
2924

3025
- name: Install dependencies
31-
run: npm ci
26+
run: npm install
3227

33-
- name: Build Astro site
28+
- name: Build Astro project
3429
run: npm run build
3530

36-
- name: Upload GitHub Pages artifact
31+
- name: Upload artifact
3732
uses: actions/upload-pages-artifact@v3
3833
with:
3934
path: ./dist
40-
name: github-pages
41-
42-
- name: Upload cache
43-
run: ls dist/
4435

4536
deploy:
4637
needs: build
4738
runs-on: ubuntu-latest
39+
permissions:
40+
pages: write
41+
id-token: write
4842
environment:
4943
name: github-pages
5044
url: ${{ steps.deployment.outputs.page_url }}
45+
5146
steps:
5247
- name: Deploy to GitHub Pages
5348
id: deployment
54-
uses: actions/deploy-pages@v1
55-
with:
56-
artifact_name: github-pages
49+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)