diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dafa98..703478a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,7 +163,7 @@ jobs: # DEPLOY for setting up cloud API - name: Set up Cloud SDK - uses: google-github-actions/auth@v1.0.0 + uses: google-github-actions/auth@v0.7.3 with: credentials_json: '${{ secrets.GCP_SA_KEY }}' export_environment_variables: true @@ -178,81 +178,29 @@ jobs: run: gcloud app deploy dispatch.yaml --quiet # DEPLOY app engine service, -nb for skipping compile - - name: Copy Engine Main + - name: Deploy App Engine Service run: python admin.py app -nb - - name: Deploy App Engine - uses: google-github-actions/deploy-appengine@v0.8.0 ### MAIN FUNCTIONS # DEPLOY update_tag function - - name: Prepare update_tag Function - run: python admin.py tag - name: Deploy update_tag Function - uses: google-github-actions/deploy-cloud-functions@v0.10.1 - with: - name: update_tag - event_trigger_resource: projects/sarsooxyz/topics/update_tag - event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish - region: europe-west2 - runtime: python310 - timeout: 60 - env_vars: DEPLOY_DESTINATION=PROD + run: python admin.py tag # DEPLOY run_user_playlist function - name: Deploy run_user_playlist Function run: python admin.py playlist - - name: Deploy run_user_playlist Function - uses: google-github-actions/deploy-cloud-functions@v0.10.1 - with: - name: run_user_playlist - event_trigger_resource: projects/sarsooxyz/topics/run_user_playlist - event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish - region: europe-west2 - runtime: python310 - timeout: 60 - env_vars: DEPLOY_DESTINATION=PROD ### CRON FUNCTIONS # DEPLOY run_all_playlists function - name: Deploy run_all_playlists Function run: python admin.py playlist_cron - - name: Deploy run_all_playlists Function - uses: google-github-actions/deploy-cloud-functions@v0.10.1 - with: - name: run_all_playlists - event_trigger_resource: projects/sarsooxyz/topics/run_all_playlists - event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish - region: europe-west2 - runtime: python310 - timeout: 60 - env_vars: DEPLOY_DESTINATION=PROD # DEPLOY run_all_playlist_stats function - name: Deploy run_all_playlist_stats Function run: python admin.py playlist_stats_cron - - name: Deploy run_all_playlist_stats Function - uses: google-github-actions/deploy-cloud-functions@v0.10.1 - with: - name: run_all_playlist_stats - event_trigger_resource: projects/sarsooxyz/topics/run_all_playlist_stats - event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish - region: europe-west2 - runtime: python310 - timeout: 60 - env_vars: DEPLOY_DESTINATION=PROD # DEPLOY run_all_tags function - name: Deploy run_all_tags Function run: python admin.py tags_cron - - name: Deploy run_all_tags Function - uses: google-github-actions/deploy-cloud-functions@v0.10.1 - with: - name: run_all_tags - event_trigger_resource: projects/sarsooxyz/topics/run_all_tags - event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish - region: europe-west2 - runtime: python310 - timeout: 60 - env_vars: DEPLOY_DESTINATION=PROD diff --git a/admin.py b/admin.py index 4798559..1e1a7aa 100755 --- a/admin.py +++ b/admin.py @@ -141,8 +141,8 @@ class Admin(Cmd): self.compile_frontend() self.copy_main_file('api') - # print('>> deploying app engine service') - # subprocess.check_call('gcloud app deploy', shell=True) + print('>> deploying app engine service') + subprocess.check_call('gcloud app deploy', shell=True) def function_deploy(self, main, function_id): """Deploy Cloud Function, copy main file and initiate gcloud command @@ -153,8 +153,8 @@ class Admin(Cmd): """ self.copy_main_file(main) - # print(f'>> deploying {function_id}') - # self.deploy_function(function_id) + print(f'>> deploying {function_id}') + self.deploy_function(function_id) def do_tag(self, args): """