Skip to content

feat: add new link (#114) #24

feat: add new link (#114)

feat: add new link (#114) #24

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
global-build:
name: Build Global Website
runs-on: ubuntu-latest
environment: Prod
env:
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_FALLBACK_BRANCH: ${{ vars.XATA_FALLBACK_BRANCH }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ENABLE_TRACK: ${{ vars.ENABLE_TRACK }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
- run: "corepack enable"
- name: Build
run: "yarn && yarn build"
- name: Upload
uses: actions/upload-artifact@v3
with:
name: out
path: out
global-upload:
name: Deploy to Global Host Provider
runs-on: ubuntu-latest
needs: global-build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: out
path: out
- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOLID_JUSTICE_161106 }}"
channelId: live
projectId: solid-justice-161106
cn-build:
name: Build CN Website
runs-on: ubuntu-latest
environment: Prod-CN
env:
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_FALLBACK_BRANCH: ${{ vars.XATA_FALLBACK_BRANCH }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ENABLE_TRACK: ${{ vars.ENABLE_TRACK }}
NEXT_PUBLIC_ENABLE_CN_DOMAIN: true
CN_STATIC_URL: ${{vars.CN_STATIC_URL}}
SENTRY_DSN: ${{vars.SENTRY_DSN}}
NEXT_PUBLIC_SENTRY_DSN: ${{vars.SENTRY_DSN}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
- run: "corepack enable"
- name: Build
run: "yarn && yarn build"
- name: Upload
uses: actions/upload-artifact@v3
with:
name: cn-out
path: out
cn-upload:
name: Deploy to CN Host Provider
runs-on: ubuntu-latest
needs: cn-build
environment: Prod
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: cn-out
path: out
- name: Deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{vars.CF_ACCOUNT_ID}}
projectName: cn-furryeventchina
directory: out
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: main
# Optional: Change the working directory
# workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: "3"