Skip to content

Commit a88b847

Browse files
authored
Update deploy.yml
1 parent 8ebfd91 commit a88b847

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,33 @@
11
name: Deploy to GitHub Pages
2-
32
on:
4-
# Trigger the workflow every time you push to the `main` branch
5-
# Using a different branch name? Replace `main` with your branch’s name
63
push:
74
branches: [main]
8-
# Allows you to run this workflow manually from the Actions tab on GitHub.
95
workflow_dispatch:
10-
11-
# Allow this job to clone the repo and create a page deployment
126
permissions:
137
contents: read
148
pages: write
159
id-token: write
16-
1710
jobs:
18-
build:
11+
deploy:
1912
runs-on: ubuntu-latest
2013
steps:
21-
- name: Checkout your repository using git
14+
- name: Checkout your repository
2215
uses: actions/checkout@v4
23-
- name: Install, build, and upload your site
24-
uses: withastro/action@v2
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
2520
- name: Install dependencies
2621
run: npm ci
2722
- name: Build Astro
28-
run: npm run build --if-present
29-
- name: Upload artifact
30-
uses: actions/upload-pages-artifact@v4
23+
run: npm run build
24+
- name: Upload artifact (GitHub Pages)
25+
uses: actions/upload-artifact@v4
3126
with:
27+
name: github-pages
3228
path: ./dist
33-
34-
deploy:
35-
needs: build
29+
release:
30+
needs: deploy
3631
runs-on: ubuntu-latest
3732
environment:
3833
name: github-pages

0 commit comments

Comments
 (0)