File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments