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
* storacha/console#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 storacha/console#20
  • Loading branch information
gobengo authored Nov 6, 2023
1 parent ad357e5 commit bba4289
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/console/.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 bba4289

Please sign in to comment.