2021-04-17 21:33:21 +08:00
|
|
|
name: vercel
|
|
|
|
|
2021-10-22 08:37:22 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
2021-04-17 21:33:21 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v2.1.2
|
|
|
|
with:
|
|
|
|
node-version: '12.x'
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-node-
|
|
|
|
|
2021-11-28 21:01:08 +08:00
|
|
|
- run: yarn install
|
|
|
|
- run: yarn bootstrap
|
2021-07-27 10:34:52 +08:00
|
|
|
- run: echo "API_URL=${{ secrets.API_URL }}" >> .env
|
2021-11-28 21:01:08 +08:00
|
|
|
- run: yarn build-docs
|
2021-04-17 21:33:21 +08:00
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: amondnet/vercel-action@v19
|
|
|
|
with:
|
|
|
|
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
|
|
|
|
vercel-args: '--prod' #Optional
|
|
|
|
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
|
|
|
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
|
|
|
working-directory: ./dist
|