generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 905 Bytes
/
deploy.yml
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
name: deploy docs to prod
on:
push:
branches: [main]
jobs:
# pre-job:
# runs-on: ubuntu-latest
# steps:
# - name: Cancel redundant workflows
# uses: technote-space/auto-cancel-redundant-workflow@v1
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
- uses: pnpm/action-setup@v2
with:
version: 6.0.2
- name: Install vercel
run: pnpm i vercel -g
- name: Format with Prettier
run: npx prettier --write .
- name: Deploy Docs
run: vercel -f --prod --token $VERCEL_TOKEN
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_CLI_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJ }}