-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (55 loc) · 1.48 KB
/
build_and_deploy.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
name: Build and Deploy
on:
push:
branches:
- master
workflow_dispatch: ~
env:
PIP_CACHE_DIR: ".cache/pip"
jobs:
build_and_deploy_to_test:
container: python:latest
runs-on: ubuntu-latest
environment: test
env:
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
DEST_PATH: ${{ secrets.DEST_PATH }}
ENV: "TEST"
ENABLE_HYPOTHESIS: "true"
ROBOTS_DIRECTIVE: "noindex"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup
run: ./.github/scripts/setup.sh
- name: Build
run: ./.github/scripts/build.sh
- name: Deploy
run: ./.github/scripts/deploy.sh
build_and_deploy_to_prod:
container: python:latest
runs-on: ubuntu-latest
environment: prod
env:
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
DEST_PATH: ${{ secrets.DEST_PATH }}
ENV: "PROD"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup
run: ./.github/scripts/setup.sh
- name: Build
run: ./.github/scripts/build.sh
- name: Deploy
run: ./.github/scripts/deploy.sh