Skip to content

Commit 60c6543

Browse files
authored
ci: move to netlify (#269)
1 parent b7e56e5 commit 60c6543

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

.github/workflows/release.yml

+23-24
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1-
name: Release
1+
name: Deploy to Netlify
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main # Change this if you're deploying from another branch
57

68
jobs:
7-
release:
8-
name: Release
9+
deploy:
910
runs-on: ubuntu-latest
11+
1012
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v3
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
1315

14-
- name: Setup Node.js
15-
uses: actions/setup-node@v3
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
1618
with:
17-
node-version: '20'
18-
cache: 'npm'
19+
node-version: 18
1920

2021
- name: Install dependencies
21-
run: npm install
22-
23-
- name: Build library
24-
run: npm run build:ngverse
22+
run: npm install # Change this if using yarn or pnpm
2523

26-
- name: Run semantic-release
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
29-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30-
run: npm run semantic-release
24+
- name: Build the project
25+
run: npm run build:docs # Adjust according to your project
3126

32-
- name: Trigger Vercel deployment
33-
if: success() # Run this step only if the previous steps succeeded
34-
env:
35-
DEPLOY_HOOK: ${{ secrets.VERCEL_PATH }}
36-
run: curl -X POST "$DEPLOY_HOOK"
27+
- name: Deploy to Netlify
28+
uses: nwtgck/actions-netlify@v2
29+
with:
30+
publish-dir: './dist/docs/browser' # Change if your build output folder is different
31+
production-branch: main
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
deploy-message: 'Deployed from GitHub Actions'
34+
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
35+
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}

0 commit comments

Comments
 (0)