Fix Deployment authentication, remove uptime message (#666) #163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
setup-build-deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
# Setup and configure gcloud CLI | |
- uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: '290.0.1' | |
project_id: epschedule-v2 | |
service_account_key: ${{ secrets.GCP_SA_KEY}} | |
export_default_credentials: true | |
- name: Set up dependencies | |
env: | |
SERVICE_ACCOUNT: ${{secrets.GCP_SERVICE_ACCOUNT}} | |
run: | | |
echo '${{secrets.GCP_SERVICE_ACCOUNT}}' > service_account.json | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Authenticate Google Cloud Service Account | |
run: gcloud auth activate-service-account ${{secrets.GCP_SERVICE_ACCOUNT}} --key-file=service_account.json | |
- name: Verify tests 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/[email protected] | |
with: | |
deliverables: app.yaml | |
project_id: ${{ secrets.GCP_PROJECT }} |