This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (47 loc) · 2.14 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- name: Install
run: npm ci
- name: Pull ROR Schema
run: |
git submodule update --init --recursive;
cd ror-schema;
git checkout master
- name: Build
run: |
cp src/env.prod.ts src/env.ts;
npm run build
- name: Deploy
uses: reggionick/[email protected]
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET_CURATORFORM_PROD}}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_CURATORFORM_PROD }}
invalidation: /*
delete-removed: true
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
with:
channel: "#deployment-updates"
color: 'good'
text: "A new version of the <https://leo.ror.org|LEO FORM> is deployed to production."
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed'
fields: |
[{ "title": "Commit message", "value": "${{ steps.extract_variables.outputs.MESSAGE }}" },
{ "title": "Committed by", "value": "<https://github.com/${{ github.repository }}/commits?author=${{ github.actor }}|${{ github.actor }}>", "short": true },
{ "title": "Commit SHA", "value": "<https://github.com/${{ github.repository }}/commit/${{ steps.extract_variables.outputs.GIT_SHA }}|${{ steps.extract_variables.outputs.GIT_SHA_SHORT }}>", "short": true },
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }}|${{ github.repository }}>", "short": true },
{ "title": "Branch", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.extract_variables.outputs.BRANCH }}|${{ steps.extract_variables.outputs.BRANCH }}>", "short": true }]