Deploy Web To Prod #71
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 Web To Prod | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy Web | |
runs-on: ubuntu-latest | |
if: github.repository == 'refly-ai/refly' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build:web | |
env: | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
VITE_API_URL: https://api.refly.ai | |
VITE_COLLAB_URL: https://collab.refly.ai | |
- name: Create Sentry release | |
uses: getsentry/[email protected] | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: refly-ai | |
SENTRY_PROJECT: web | |
with: | |
environment: production | |
- name: Deploy web to Cloudflare Pages | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: refly-app | |
branch: main | |
workingDirectory: apps/web | |
directory: dist |