From 1f3d445113f367258a48e11d49aad9223a01be18 Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Mon, 22 Jan 2024 19:23:34 +0100 Subject: [PATCH] Deploy from both CI-CD and CI-CD-renv, ensuring no concurrent jobs --- .github/workflows/ci-cd-renv.yml | 7 ++++++- .github/workflows/ci-cd.yml | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-renv.yml b/.github/workflows/ci-cd-renv.yml index 6beba3d..b7046ac 100644 --- a/.github/workflows/ci-cd-renv.yml +++ b/.github/workflows/ci-cd-renv.yml @@ -15,6 +15,11 @@ on: schedule: - cron: '0 0 1 * *' +# Avoid concurrent deployments from both workflows by running one at a time +# (specific for ShinyCICD maintenance) +concurrency: + group: shinyapps + jobs: CI-CD: runs-on: ${{ matrix.config.os }} @@ -76,7 +81,7 @@ jobs: - name: Deploy to shinyapps.io # Continuous deployment only for pushes to the main / master branch - if: false && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' env: SHINYAPPS_ACCOUNT: ${{ secrets.SHINYAPPS_ACCOUNT }} SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7c59219..a94541b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -15,6 +15,11 @@ on: schedule: - cron: '0 0 1 * *' +# Avoid concurrent deployments from both workflows by running one at a time +# (specific for ShinyCICD maintenance) +concurrency: + group: shinyapps + jobs: CI-CD: runs-on: ${{ matrix.config.os }}