Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:
cancel-in-progress: true

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -41,11 +41,33 @@ jobs:
env:
ASTRO_TELEMETRY_DISABLED: 1

- name: Deploy to Cloudflare
# Needs repo secrets CLOUDFLARE_API_TOKEN (Edit Cloudflare Workers
# template, scoped to this account and the dev-parikh.com zone) and
# CLOUDFLARE_ACCOUNT_ID
- uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: docs-dist
path: packages/docs/dist

deploy:
# Separate job so only pushes to main enter the prod environment —
# PR builds never see its secrets or create deployments
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
environment:
name: prod
url: https://docs.paywright.dev-parikh.com
steps:
- uses: actions/checkout@v5 # for wrangler.jsonc

- uses: actions/download-artifact@v4
with:
name: docs-dist
path: packages/docs/dist

- name: Deploy to Cloudflare
# Needs prod environment secrets CLOUDFLARE_API_TOKEN (Edit Cloudflare
# Workers template, scoped to this account and the dev-parikh.com
# zone) and CLOUDFLARE_ACCOUNT_ID
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand Down
Loading