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
49 lines (49 loc) · 2.07 KB
/
dev.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
name: Deploy Dev
on:
push:
branches:
- "dev"
paths-ignore:
- '**/README.md'
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 dev
- name: Build
run: |
cp src/env.dev.ts src/env.ts;
npm run build
- name: Deploy
uses: reggionick/[email protected]
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET_CURATORFORM_DEV}}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_CURATORFORM_DEV }}
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.dev.ror.org|LEO FORM> is deployed to dev."
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed'
fields: |
[{ "title": "Committed by", "value": "<https://github.com/ror-community/leo-form/commits?author=${{ github.actor }}|${{ github.actor }}>", "short": true },
{ "title": "Commit SHA", "value": "<https://github.com/ror-community/leo-form/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/ror-community/leo-form/tree/${{ steps.extract_variables.outputs.BRANCH }}|${{ steps.extract_variables.outputs.BRANCH }}>", "short": true }]