-
-
Notifications
You must be signed in to change notification settings - Fork 38
55 lines (47 loc) · 1.41 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Deploy(main)'
on:
push:
branches:
- main
pull_request:
types: [ opened, edited, synchronize, reopened ]
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i
- run: npm test
- run: npm run lint
- run: npm run stylelint
- run: npm run typecheck
deploy:
needs: check
name: 'Deploy to vercel'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/netlify-deploy
# - name: deploy to netlify
# uses: jsmrcaga/[email protected]
# with:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# NETLIFY_DEPLOY_TO_PROD: true
# use_nvm: false
# build_command: 'npm run build:docs'
# build_directory: 'docs/docs/.vitepress/dist'
# https://github.com/marketplace/actions/vercel-action
- name: deploy to vercel
uses: amondnet/vercel-action@v25
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-args: '--prod'
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}