Skip to content

Commit a34cd96

Browse files
authored
Refactor GitHub Actions deploy workflow
Updated deploy workflow to fix formatting and improve steps.
1 parent 0d19604 commit a34cd96

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [ main ]
6-
workflow_dispatch:
6+
workflow_dispatch:
77

88
permissions:
99
contents: read
@@ -16,28 +16,30 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
19+
1920
- name: Setup Node
20-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@v4
2122
with:
22-
node-version: '18'
23+
node-version: "18"
24+
2325
- name: Install dependencies
24-
run: npm install
25-
working-directory: ./Astro-Static-Project
26+
run: npm ci
27+
2628
- name: Build
27-
run: npm run build
28-
working-directory: ./Astro-Static-Project
29+
run: npm run build
30+
2931
- name: Upload artifact
3032
uses: actions/upload-pages-artifact@v3
3133
with:
32-
path: ./Astro-Static-Project/dist
34+
path: ./dist
3335

3436
deploy:
3537
needs: build
3638
runs-on: ubuntu-latest
37-
environment:
39+
environment:
3840
name: github-pages
3941
url: ${{ steps.deployment.outputs.page_url }}
4042
steps:
41-
- name: Deploy to GitHub Pages
42-
id: deployment
43+
- name: Deploy to GitHub Pages
44+
id: deployment
4345
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)