-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (54 loc) · 1.54 KB
/
deploy_production.yml
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
56
57
58
59
60
61
62
63
name: Deploy ALICE Production
on:
# Run this workflow on push to production-release tag (via chatops)
push:
tags:
- production-release
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_production:
name: Build Production
runs-on: ubuntu-latest
env:
HEAD_COMMIT: ${{ github.sha }}
steps:
- uses: actions/checkout@v3
- name: Node.js build
uses: actions/setup-node@v3
with:
node-version: 'lts/iron'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
env:
REACT_APP_ENV: production
- name: Write commit_id.txt
run: echo ${HEAD_COMMIT} > ./build/commit_id.txt
- name: Save build
uses: actions/upload-artifact@v3
with:
name: build
path: ./build/
deploy:
name: Deploy Production
uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main
needs: build_production
with:
source: 'build'
target: 'alice.zooniverse.org'
secrets:
creds: ${{ secrets.AZURE_STATIC_SITES }}
slack_notification:
name: Send Slack notification
uses: zooniverse/ci-cd/.github/workflows/slack_notification.yaml@main
needs: deploy
if: always()
with:
commit_id: ${{ github.sha }}
job_name: Build Production
status: ${{ needs.deploy.result }}
title: 'Alice Production deploy complete'
title_link: 'https://alice.zooniverse.org'
secrets:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}