From e692c4a2cc5e3fa0384b92379fad2cff4bb7b2dd Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 27 Dec 2022 08:41:53 -0500 Subject: [PATCH] Tweak secret detection for playground releases (#1402) --- .github/workflows/playground.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/playground.yaml b/.github/workflows/playground.yaml index 0d704adf7e..7a3ce419b7 100644 --- a/.github/workflows/playground.yaml +++ b/.github/workflows/playground.yaml @@ -4,8 +4,6 @@ on: workflow_dispatch: push: branches: [main] - pull_request: - branches: [main] env: CARGO_INCREMENTAL: 0 @@ -15,6 +13,8 @@ env: jobs: publish: runs-on: ubuntu-latest + env: + CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -41,9 +41,7 @@ jobs: run: npm run build working-directory: playground - name: "Deploy to Cloudflare Pages" - env: - CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - if: ${{ env.CF_API_TOKEN }} != null + if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }} uses: cloudflare/wrangler-action@2.0.0 with: apiToken: ${{ secrets.CF_API_TOKEN }}