-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (50 loc) · 1.5 KB
/
prod.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: prod
run-name: Production Deployment
on:
push:
branches: [main]
jobs:
# Ensure a successful deploy to staging before deploying to prod
deploy-stage:
uses: ./.github/workflows/stage.yaml
secrets: inherit
release:
runs-on: ubuntu-latest
needs: deploy-stage
environment: prod
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./bin/make release
env:
GITHUB_APP_ID: ${{ secrets.EVYLANGBOT_GITHUB_APP_ID }}
GITHUB_APP_PEM: ${{ secrets.EVYLANGBOT_GITHUB_APP_PEM }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-prod:
runs-on: ubuntu-latest
needs: release
environment: prod
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./bin/make deploy ENV=prod CHANNEL=live
env:
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_EVY_LANG }}
- run: ./bin/make e2e USE_DOCKER=1
env:
BASEURL: ${{ env.BASEURL_APEX }}
BASEURL_PLAY: ${{ env.BASEURL_PLAY }}
BASEURL_DOCS: ${{ env.BASEURL_DOCS }}
howl-on-fail:
runs-on: ubuntu-latest
needs: [deploy-stage, release, deploy-prod]
if: always() && contains(join(needs.*.result, ','), 'failure')
steps:
- uses: actions/checkout@v4
- run: ./bin/howl
env:
# Notify evy Discord server on channel #evydev
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DISCORD_TEXT: "@here"