use github.ref rather than github.event.ref in deploy.yml (#2495)
`github.event.ref` is only there on certain events, but `github.ref` is always there ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2]
This commit is contained in:
parent
ef68211bae
commit
d57f05d597
1 changed files with 5 additions and 5 deletions
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
|
@ -10,23 +10,23 @@ on:
|
||||||
env:
|
env:
|
||||||
CI: 1
|
CI: 1
|
||||||
PRINT_GITHUB_ANNOTATIONS: 1
|
PRINT_GITHUB_ANNOTATIONS: 1
|
||||||
TLDRAW_ENV: ${{ (github.event.ref == 'refs/heads/production' && 'production') || (github.event.ref == 'refs/heads/main' && 'staging') || 'preview' }}
|
TLDRAW_ENV: ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to ${{ (github.event.ref == 'refs/heads/production' && 'production') || (github.event.ref == 'refs/heads/main' && 'staging') || 'preview' }}
|
name: Deploy to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }}
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
runs-on: ubuntu-latest-16-cores-open
|
runs-on: ubuntu-latest-16-cores-open
|
||||||
environment: ${{ github.event.ref == 'refs/heads/production' && 'deploy-production' || 'deploy-staging' }}
|
environment: ${{ github.ref == 'refs/heads/production' && 'deploy-production' || 'deploy-staging' }}
|
||||||
concurrency: ${{ github.event.ref == 'refs/heads/production' && 'deploy-production' || github.event.ref }}
|
concurrency: ${{ github.ref == 'refs/heads/production' && 'deploy-production' || github.ref }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Notify initial start
|
- name: Notify initial start
|
||||||
uses: MineBartekSA/discord-webhook@v2
|
uses: MineBartekSA/discord-webhook@v2
|
||||||
if: github.event.ref == 'refs/heads/production'
|
if: github.ref == 'refs/heads/production'
|
||||||
with:
|
with:
|
||||||
webhook: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }}
|
webhook: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }}
|
||||||
content: 'Preparing ${{ env.TLDRAW_ENV }} deploy: ${{ github.event.head_commit.message }} by ${{ github.event.head_commit.author.name }}'
|
content: 'Preparing ${{ env.TLDRAW_ENV }} deploy: ${{ github.event.head_commit.message }} by ${{ github.event.head_commit.author.name }}'
|
||||||
|
|
Loading…
Reference in a new issue