Skip to content

Commit de78f2a

Browse files
committed
chore: updated action
1 parent 6c2d66d commit de78f2a

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
name: Build and Deploy to GitHub Pages
1+
name: Deploy to GitHub Pages
22

33
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
46
push:
5-
branches: [ 'master' ]
7+
branches: [ master ]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
69
workflow_dispatch:
710

11+
# Allow this job to clone the repo and create a page deployment
812
permissions:
913
contents: read
1014
pages: write
@@ -14,32 +18,18 @@ jobs:
1418
build:
1519
runs-on: ubuntu-latest
1620
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@v4
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v5
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v5
1925

20-
- name: Setup Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: '20'
24-
25-
- name: Install dependencies
26-
run: npm ci || npm install
27-
28-
- name: Build site
29-
run: npm run build
30-
31-
- name: Upload static files as artifact
32-
id: deployment
33-
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
34-
with:
35-
path: './dist'
3626
deploy:
27+
needs: build
28+
runs-on: ubuntu-latest
3729
environment:
3830
name: github-pages
3931
url: ${{ steps.deployment.outputs.page_url }}
40-
runs-on: ubuntu-latest
41-
needs: build
4232
steps:
4333
- name: Deploy to GitHub Pages
4434
id: deployment
45-
uses: actions/deploy-pages@v4
35+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)