Skip to content

Deploy recipes

Deploy recipes #1355

Workflow file for this run

name: "Deploy recipes"
on:
workflow_dispatch:
# push:
# branches: ["main"]
# paths: # only run on changes to feedstock relevant code
# - 'feedstock/**'
# - 'configs/**'
# - '.github/workflows/deploy.yaml'
pull_request:
branches: ["main"]
paths: # only run on changes to feedstock relevant code
- 'feedstock/**'
- 'configs/**'
- '.github/workflows/deploy.yaml'
# schedule:
# - cron: "0 * * * SUN" # run every sunday
jobs:
deploy-recipes:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: deploy-recipes
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: "Authenticate to Google Cloud"
id: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}"
- name: "Deploy recipes PR"
if: ${{ github.event_name == 'pull_request' }}
uses: "pangeo-forge/deploy-recipe-action@v0.3"
with:
select_recipe_by_label: "" #to circumvent https://github.com/leap-stc/cmip6-leap-feedstock/issues/6#issuecomment-1668577971
pangeo_forge_runner_config: "./configs/config-pgf-runner-leap-dataflow-pr.json"
env:
IS_TEST: true
GOOGLE_APPLICATION_CREDENTIALS: "${{ steps.auth.outputs.credentials_file_path }}"
- name: "Deploy recipes Production"
if: ${{ github.event_name != 'pull_request' }}
uses: "pangeo-forge/deploy-recipe-action@v0.3"
with:
select_recipe_by_label: "" #to circumvent https://github.com/leap-stc/cmip6-leap-feedstock/issues/6#issuecomment-1668577971
pangeo_forge_runner_config: "./configs/config-pgf-runner-leap-dataflow.json"
env:
IS_TEST: false
GOOGLE_APPLICATION_CREDENTIALS: "${{ steps.auth.outputs.credentials_file_path }}"