From 690d9dc7a1c3fdea6c391d08181047b003436ac1 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Wed, 14 Jun 2023 06:47:30 -0700 Subject: [PATCH] continuous deploy on Circle for #540 --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index dbac7ee..142a7ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,9 @@ jobs: pip install -U -r requirements.txt pip install coverage coveralls + ln -sf `pyenv prefix`/lib/python3.9/site-packages/oauth_dropins/fonts oauth_dropins_fonts + ln -sf `pyenv prefix`/lib/python3.9/site-packages/oauth_dropins/static oauth_dropins_static + - run: name: Build and test command: | @@ -44,6 +47,17 @@ jobs: python -m coverage html -d /tmp/coverage_html if [ "$COVERALLS_REPO_TOKEN" != "" ]; then coveralls || true; fi + # a step only runs if all previous steps succeed, including tests above + # https://circleci.com/docs/configuration-reference/#the-when-attribute + - run: + name: Deploy + command: | + echo $$CIRCLE_BRANCH + if [ $CIRCLE_BRANCH = "cd" ]; then + echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=- + gcloud -q beta app deploy --no-cache --project bridgy-federated *.yaml + fi + - save_cache: key: venv-4-{{ .Branch }}-{{ checksum "requirements.txt" }} paths: