Skip to content
Merged
Show file tree
Hide file tree
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
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,61 @@ jobs:

${{ steps.deploy.outputs.command-output }}

deploy-guide:
runs-on: ubuntu-latest
name: Deploy Guide Worker
if: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' }}
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@v6.0.2
- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version-file: ".node-version"
cache: "yarn"
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install
- name: Build guide
run: yarn build:guide
- name: Set guide deployment command
shell: bash
run: |
RAW_BRANCH="${{ github.head_ref || github.ref_name }}"
SAFE_BRANCH=$(echo "$RAW_BRANCH" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-+/-/g')
SAFE_BRANCH="${SAFE_BRANCH:0:28}"

if [[ "${{ github.event_name }}" == "push" && "$RAW_BRANCH" == "master" ]] || [[ "${{ inputs.environment }}" == "production" ]]; then
echo "GUIDE_DEPLOY_COMMAND=deploy" >> "$GITHUB_ENV"
else
echo "GUIDE_DEPLOY_COMMAND=versions upload --preview-alias=$SAFE_BRANCH" >> "$GITHUB_ENV"
fi
- name: Deploy guide
id: deploy-guide
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: apps/guide
command: ${{ env.GUIDE_DEPLOY_COMMAND }}
wranglerVersion: 4.85.0
env:
FORCE_COLOR: 0
- name: Comment PR with guide deployment link
if: ${{ github.event_name == 'pull_request' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
header: guide-deployment
message: |
## Guide Cloudflare deployment

${{ steps.deploy-guide.outputs.command-output }}

e2e:
runs-on: ubuntu-latest
name: E2E Tests
Expand Down
1 change: 1 addition & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"*.swp",
"apps/docs/app/**/*.mjs",
"build",
"data/api/**/*.json",
"apps/docs/data/api/**/*.json",
"dist",
"apps/docs/index_data/*.json",
Expand Down
7 changes: 7 additions & 0 deletions apps/guide/wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "guide"
compatibility_date = "2026-05-20"
workers_dev = true

[assets]
directory = "./out"
not_found_handling = "single-page-application"
Loading