Skip to content

Commit fe050a6

Browse files
authored
Create deploy.yml
CD file for deploying
1 parent a97382f commit fe050a6

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
2+
3+
name: Continuous Deployment
4+
5+
on:
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
deploy:
11+
name: Build and Deploy app to GitHub Pages
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout the code base
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '22'
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Build the project
28+
run: npm run build
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v3
32+
with:
33+
github_token: ${{ secrets.GH_TOKEN }}
34+
publish_dir: ./build
35+
force_orphan: true
36+
user_name: 'github-actions[bot]'
37+
user_email: 'github-actions[bot]@users.noreply.github.com'
38+
full_commit_message: 'deploy: publish app to GitHub Pages'

0 commit comments

Comments
 (0)