Skip to content

Commit

Permalink
ci: .github/workflows/deploy.yml preview job sets gh environment (#18)
Browse files Browse the repository at this point in the history
Motivation
* #17
* make preview environments easier to find by having our github workflow
files use the `environment` affordance to record when it deploys
preview/staging environments to cloudflare pages. That way they will be
browsable/clickable in the GitHub UI at
https://github.com/web3-storage/console/deployments

note
* [x] wait for cloudflare to not be down to ensure the CI workflow will
then pass #20
  • Loading branch information
gobengo authored Nov 6, 2023
1 parent 94bcfe4 commit f1ca56a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
needs:
- test
runs-on: ubuntu-latest
environment:
name: ${{ (github.ref_name == 'main') && 'staging' || format('preview-{0}', github.ref_name) }}
url: ${{ (github.ref_name == 'main') && 'https://staging.console.web3.storage/' || steps.cloudflare_url.outputs.stdout }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pnpm
Expand Down

0 comments on commit f1ca56a

Please sign in to comment.