-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.55 KB
/
deploy-to-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
56
57
58
59
60
61
62
63
64
65
66
name: Deploy Configurations To Production DB
on:
workflow_dispatch:
pull_request:
types:
- closed
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
# Either trigger from main or merged pull requests
if: ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true) || github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
env:
HUSKY: 0
run: |
npm ci
- name: Execute Unit Tests
env:
HUSKY: 0
run: |
npm run test
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9.13'
- name: Display Python Version
run: |
which python
python -c "import sys; print(sys.version)"
- name: Install Python Dependencies
run: python -m pip install --upgrade pip requests jsondiff
- name: Display Working Directory Files
run: |
echo current directory
pwd
ls -a
- name: Display Current Package Version
run: echo $(jq -r .version package.json)
- name: Deploy To Production DB
run: |
echo "🍏 prod deployment complete."