-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (63 loc) · 2.05 KB
/
push.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
64
65
66
67
68
69
70
71
72
73
74
75
name: Push
on:
push:
branches: [develop]
env:
PROJECT: casimir
STAGE: dev
AWS_REGION: us-east-2
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
# Skip any pushes with commit flag '(skip deploy)'
# Comment out for testing
if: ${{ !contains(github.event.head_commit.message, '(skip deploy)') }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install action dependencies
run: |
curl -sSf https://atlasgo.sh | sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install mdBook plugins
uses: actions-rs/cargo@v1
with:
command: install
args: mdbook-katex mdbook-mermaid
- name: Install and build all package dependencies
run: npm ci
env:
PUBLIC_STAGE: ${{ env.STAGE }}
- name: Deploy cdk infrastructure
run: npm run deploy:cdk
- name: Migrate users database
run: npm run migrations:users
- name: Slack the team
if: ${{ success() || failure() }}
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<https://dev.casimir.co | *:ocean: Casimir (Dev)*> deployment finished with <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | _${{ job.status }}_>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK