Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-sawlani-yral committed Feb 4, 2025
1 parent 5cf84e2 commit c567dea
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
publish-artifact: true

preview:
if: ${{ github.event.pull_request.merged == false}}
needs: build_check
runs-on: ubuntu-latest

Expand All @@ -31,6 +32,8 @@ jobs:
- uses: actions/checkout@v3
- name: Download build
uses: actions/download-artifact@v4
if: ${{ github.event.pull_request.state == "open"}}

with:
name: build-musl
- run: chmod +x target/x86_64-unknown-linux-musl/release/hot-or-not-web-leptos-ssr
Expand All @@ -41,7 +44,7 @@ jobs:

- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set secret tokens
if: ${{ github.event.pull_request.merged == false}}
if: ${{ github.event.pull_request.state == "open"}}
run: |
APP_NAME="pr-${{github.event.number}}-yral-dapp-hot-or-not-web-leptos-ssr"
flyctl secrets set CF_TOKEN="$CF_TOKEN" --app "$APP_NAME" --stage
Expand Down Expand Up @@ -71,12 +74,12 @@ jobs:
QSTASH_TOKEN: ${{ secrets.QSTASH_TOKEN }}
GA4_API_SECRET: ${{ secrets.GOOGLE_ANALYTICS_MEASUREMENT_PROTOCOL_API_SECRET }}
NSFW_GRPC_TOKEN: ${{ secrets.TOKEN_TO_SIGN_OUTGOING_CALLS_TO_NSFW_DETECT_SERVICE }}
e2e-tests:

e2e-tests:
needs: preview
uses: ./.github/workflows/e2e-tests.yml
if: ${{ github.event.pull_request.state == "open"}}
secrets: inherit
with:
preview_url: https://pr-${{github.event.number}}-yral-dapp-hot-or-not-web-leptos-ssr.fly.dev
build_name: PR-${{github.event.number}}-commit-${{github.sha}}-attempt-${{github.run_attempt}}

0 comments on commit c567dea

Please sign in to comment.