Skip to content

Commit 165c3bc

Browse files
committed
added gh-action
1 parent 1d87ee3 commit 165c3bc

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on push to the main branch
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js (if needed)
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18'
19+
20+
# Step to install dependencies and build your project.
21+
# Replace this with the commands for your specific project.
22+
- name: Install Dependencies and Build
23+
run: |
24+
pnpm install
25+
pnpm run build
26+
27+
# Use the GitHub Pages deploy action.
28+
# This action takes the built files and pushes them to the
29+
# gh-pages branch of the target repository.
30+
- name: Deploy to GitHub Pages
31+
uses: JamesIves/github-pages-deploy-action@v4
32+
with:
33+
branch: main # The branch to deploy to (in the target repo)
34+
folder: build/client # The folder with the built files (e.g., 'public', 'build')
35+
repository-name: roadrules-am/your-organization-name.github.io
36+
token: ${{ secrets.GH_PAGES_TOKEN }}
37+
clean: true

0 commit comments

Comments
 (0)