mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
54 lines
2.0 KiB
YAML
54 lines
2.0 KiB
YAML
name: Production
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
deploy-v2-vercel:
|
|
name: Deploy v2 to Vercel (production)
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: 2v-production
|
|
url: ${{ steps.deploy.outputs.deployment-url }}
|
|
outputs:
|
|
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Deploy
|
|
id: deploy
|
|
uses: ./.github/composite/deploy-vercel
|
|
with:
|
|
environment: production
|
|
vercelOrg: ${{ secrets.VERCEL_ORG_ID }}
|
|
vercelProject: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
vercelToken: ${{ secrets.VERCEL_TOKEN }}
|
|
opItem: op://gitbook-open/2v-production
|
|
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
|
deploy-v2-cloudflare:
|
|
name: Deploy v2 to Cloudflare Worker (production)
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: 2c-production
|
|
url: ${{ steps.deploy.outputs.deployment-url }}
|
|
outputs:
|
|
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Deploy
|
|
id: deploy
|
|
uses: ./.github/composite/deploy-cloudflare
|
|
with:
|
|
environment: production
|
|
deploy: true
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
opItem: op://gitbook-open/2c-production
|
|
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
|
commitTag: main
|
|
commitMessage: ${{ github.sha }}
|
|
- name: Outputs
|
|
run: |
|
|
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|