Skip to content

Commit 08a3313

Browse files
committed
feat: refactor GitHub Actions workflow for improved deployment structure
1 parent 1d22061 commit 08a3313

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,33 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v3
13+
- name: Checkout code
14+
uses: actions/checkout@v3
1515

16-
- name: Set up Node.js
17-
uses: actions/setup-node@v3
18-
with:
19-
node-version: '20.18.1' # Use the version of Node.js your project requires
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '20.18.1' # Use the version of Node.js your project requires
2020

21-
- name: Install dependencies
22-
run: npm install
21+
- name: Install dependencies
22+
run: npm install
2323

24-
- name: Build Astro Starlight project
25-
run: npm run build
24+
- name: Build Astro Starlight project
25+
run: npm run build
2626

27-
- name: Deploy to GitHub Pages
28-
uses: peaceiris/actions-gh-pages@v3
29-
with:
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: ./dist
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./dist
32+
33+
deploy:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deploy.outputs.page_url }}
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deploy
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)