Skip to content

Commit bb6e033

Browse files
authored
Update deploy.yml
1 parent ee4e6c1 commit bb6e033

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- main
77

8+
permissions: # ✅ Ensure correct permissions
9+
contents: write
10+
pages: write
11+
id-token: write
12+
813
jobs:
914
build:
1015
name: Build
@@ -16,6 +21,8 @@ jobs:
1621

1722
- name: Setup Node
1823
uses: actions/setup-node@v3
24+
with:
25+
node-version: 18 # Adjust as needed
1926

2027
- name: Install dependencies
2128
run: npm install --no-package-lock
@@ -36,6 +43,9 @@ jobs:
3643
if: github.ref == 'refs/heads/main'
3744

3845
steps:
46+
- name: Checkout repo
47+
uses: actions/checkout@v3
48+
3949
- name: Download artifact
4050
uses: actions/download-artifact@v3
4151
with:
@@ -45,5 +55,6 @@ jobs:
4555
- name: Deploy to GitHub Pages
4656
uses: peaceiris/actions-gh-pages@v3
4757
with:
48-
github_token: ${{ secrets.GH_TOKEN }}
49-
publish_dir: ./build
58+
github_token: ${{ secrets.GITHUB_TOKEN }} # ✅ Corrected Token
59+
publish_dir: ./build
60+
publish_branch: gh-pages

0 commit comments

Comments
 (0)