Skip to content
Closed
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
4 changes: 3 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ jobs:
env:
VITE_APP_VERSION: ${{ github.sha }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- id: staging
run: echo "project=$(sed -n 's/^name = "\(.*\)"/\1/p' wrangler.staging.toml)" >> $GITHUB_OUTPUT
- uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --config wrangler.staging.toml --branch=main
command: pages deploy --project-name ${{ steps.staging.outputs.project }} --branch=main
20 changes: 1 addition & 19 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,7 @@ concurrency:
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
outputs:
has-staging: ${{ steps.check.outputs.has-staging }}
steps:
- id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
has_staging=false
gh api "repos/${{ github.repository }}/contents/wrangler.staging.toml" --silent 2>/dev/null && has_staging=true
echo "has-staging=$has_staging" >> $GITHUB_OUTPUT

preview:
needs: check
if: needs.check.outputs.has-staging == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
Expand All @@ -47,5 +29,5 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --config wrangler.staging.toml --branch="${{ github.head_ref }}"
command: pages deploy --branch="${{ github.head_ref }}"
gitHubToken: ${{ github.token }}