Skip to content

Commit c1312d7

Browse files
committed
refactor: update GitHub Actions workflow for improved deployment process
1 parent e5f7fe0 commit c1312d7

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches:
6-
- main # Set this to the branch you want to deploy from
7-
workflow_dispatch: # Allow manual triggering
6+
- main
7+
workflow_dispatch:
88

99
permissions:
10-
contents: write # This is needed for the deployment action to work
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
1117

1218
jobs:
13-
build-and-deploy:
19+
build:
1420
runs-on: ubuntu-latest
1521
steps:
1622
- name: Checkout
@@ -29,8 +35,18 @@ jobs:
2935
env:
3036
VITE_API_URL: ${{ secrets.VITE_API_URL }}
3137

32-
- name: Deploy to GitHub Pages
33-
uses: peaceiris/actions-gh-pages@v3
38+
- name: Upload Pages artifact
39+
uses: actions/upload-pages-artifact@v3
3440
with:
35-
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: ./dist
41+
path: ./dist
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)