Skip to content

Commit f14ee3c

Browse files
authored
Update deploy.yml
1 parent dfce204 commit f14ee3c

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,23 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches:
6-
- main # Or the branch you're working on
6+
- main # Trigger deployment only on push to the 'main' branch
77

88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
1112
steps:
13+
# Checkout the code
1214
- name: Checkout code
1315
uses: actions/checkout@v2
14-
15-
- name: Set up Node.js
16-
uses: actions/setup-node@v2
1716
with:
18-
node-version: '14'
19-
20-
- name: Install dependencies
21-
run: npm install
22-
23-
- name: Build the project
24-
run: npm run build # This depends on your build system (e.g., React, Vue, etc.)
17+
ref: main # Ensure you're deploying from the correct branch (main)
2518

19+
# Deploy to GitHub Pages
2620
- name: Deploy to GitHub Pages
27-
uses: JamesIves/github-pages-deploy-action@4.2.0
21+
uses: JamesIves/github-pages-deploy-action@v4.2.0
2822
with:
29-
branch: gh-pages # Deployment branch
30-
folder: src # Folder to deploy (set to where the build output is)
23+
branch: gh-pages # The branch where the content will be deployed (default is gh-pages)
24+
folder: src # The folder to deploy (in your case, it's 'src')
25+
token: ${{ secrets.GITHUB_TOKEN }} # Automatically used token for authentication

0 commit comments

Comments
 (0)