Skip to content

Commit e9ef501

Browse files
iamjr15claude
andcommitted
ci: add Netlify auto-deploy workflow
- Add GitHub Actions workflow to deploy to Netlify on push to main - Configure netlify.toml dev server to serve from root directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 9317bcc commit e9ef501

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to Netlify
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build package
27+
run: npm run build
28+
29+
- name: Deploy to Netlify
30+
uses: nwtgck/actions-netlify@v3
31+
with:
32+
publish-dir: '.'
33+
production-deploy: true
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
deploy-message: 'Deploy from GitHub Actions - ${{ github.sha }}'
36+
functions-dir: 'netlify/functions'
37+
env:
38+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
39+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[build]
22
functions = "netlify/functions"
33

4+
[dev]
5+
publish = "."
6+
47
[[redirects]]
58
from = "/api/ghcg/fetch-data"
69
to = "/.netlify/functions/fetch-data"

0 commit comments

Comments
 (0)