feat: support tidb cloud oauth #1099
Workflow file for this run
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: Surge PR Preview | |
on: | |
pull_request_target: | |
paths: | |
- 'web/**' | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./web | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Use Node.js 18 | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: web/package-lock.json | |
- name: Install | |
run: npm ci --prefer-offline --no-audit | |
- name: Lint | |
run: | | |
npm run lint:ci | |
npm run typecheck | |
preview: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./web | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Use Node.js 18 | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: web/package-lock.json | |
- name: Install | |
run: npm ci --prefer-offline --no-audit | |
- name: Prefetch | |
run: npm run prefetch | |
- name: Build 🏗️ | |
env: | |
SENTRY_DSN: https://[email protected]/6588620 | |
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} | |
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} | |
GIFT_APP_API_BASE: ${{ secrets.GIFT_APP_PREVIEW_API_BASE }} | |
OSSINSIGHT_PREVIEW: true | |
TIDBCLOUD_HOST: dev.tidbcloud.com | |
run: npm run build | |
- name: Deploy to ossinsight.surge.sh 🚀 | |
uses: afc163/surge-preview@v1 | |
id: preview_step | |
with: | |
surge_token: ${{ secrets.SURGE_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
teardown: true | |
build: echo 'Deployed to surge' | |
dist: './web/build' |