Skip to content

Commit

Permalink
fix(CI): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YannicEl committed Aug 6, 2023
1 parent cf523e4 commit 151ba34
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
deploy:
name: ${{ startsWith(github.event.head_commit.message, 'chore(release)') && 'Production' || 'Canary'}}
name: Canary

runs-on: ubuntu-latest

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install dependencies
run: pnpm --filter docs install

- name: Deploy docs canary
- name: Deploy docs
run: pnpm --filter docs deploy:dev | tail -n 1 > preview_url.txt
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand All @@ -53,3 +53,41 @@ jobs:
with:
body: preview_url.txt
is_file: true

deploy:
name: Production

runs-on: ubuntu-latest

permissions:
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Restore docs-build cache
uses: actions/download-artifact@v3
with:
name: docs-build
path: packages/docs/.vitepress

- name: Install dependencies
run: pnpm --filter docs install

- name: Deploy docs
run: pnpm --filter docs deploy:prod
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 comments on commit 151ba34

Please sign in to comment.