Auth fix (#668) #165
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 | |
#- uses: 'google-github-actions/auth@v2' | |
# with: | |
# credentials_json: ${{secrets.GCP_SERVICE_ACCOUNT}} | |
- name: Authenticate Google Cloud | |
run: gcloud auth activate-service-account --key-file=${{secrets.GCP_SERVICE_ACCOUNT}} | |
# 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: 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 }} |