Skip to content

Commit 942de75

Browse files
committed
feat: Add GitHub Actions workflow for deployment
- Created a new `deploy.yml` workflow to automate deployment to GitHub Pages. - Configured steps for checking out the code, setting up Node.js, installing dependencies, building the project, and deploying the output to GitHub Pages.
1 parent 3705270 commit 942de75

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout the repository
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
# Setup Nodejs
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
24+
# Install Dependencies
25+
- name: Install Dependencies
26+
run: npm install
27+
28+
# Build the project
29+
- name: Build project
30+
run: npm run build
31+
32+
# Deploy to github pages
33+
- name: Deploy to github pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: dist

0 commit comments

Comments
 (0)