chore: polish readme to fix dead links #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy doc site | |
on: | |
push: | |
branches: | |
- develop | |
paths: | |
- 'docs/**' | |
- 'site/**' | |
pull_request_target: | |
paths: | |
- 'docs/**' | |
- 'site/**' | |
permissions: write-all | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
if: github.event_name == 'pull_request_target' | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/checkout@v3 | |
if: github.event_name != 'pull_request_target' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: setup Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: install dependencies | |
working-directory: site | |
run: yarn install | |
- name: build doc site | |
working-directory: site | |
run: yarn build | |
- name: deploy to staging | |
uses: amondnet/vercel-action@v25 | |
id: vercel-action-staging | |
if: github.event_name == 'pull_request_target' | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
scope: ${{ secrets.VERCEL_TEAM_ID }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
github-comment: true | |
working-directory: site/build | |
- name: deploy to production | |
uses: amondnet/vercel-action@v25 | |
id: vercel-action-production | |
if: github.event_name == 'push' | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
scope: ${{ secrets.VERCEL_TEAM_ID }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: site/build | |
github-comment: true | |
vercel-args: '--prod ' |