-
Notifications
You must be signed in to change notification settings - Fork 17
60 lines (48 loc) · 1.51 KB
/
deploy.yml
File metadata and controls
60 lines (48 loc) · 1.51 KB
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
name: deploy
on:
push:
branches:
- master
jobs:
setup-build-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
npm install prettier
- uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{secrets.GCP_SERVICE_ACCOUNT}}
- name: Export key
run: echo '${{secrets.GCP_SERVICE_ACCOUNT}}' > service_account.json
- name: Verify JSON syntax is still correct
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
- name: Verify style is still correct
run: |
autoflake . --remove-all-unused-imports --quiet --in-place -r --exclude venv --check
black . --check
isort . --check --profile black
npx prettier --check .
- name: Verify tests still pass
run: python main_test.py
- name: Upload master_schedule.json
run: python scripts/upload_master_schedule.py
- name: Deploy to App Engine
uses: google-github-actions/deploy-appengine@v2
with:
deliverables: app.yaml
project_id: ${{ secrets.GCP_PROJECT }}