From 9c395c6c031e124a0225bee2b4ea127e9eb7277f Mon Sep 17 00:00:00 2001 From: Lukas Wallrich Date: Fri, 27 Sep 2024 15:00:24 +0100 Subject: [PATCH] Fix deploy conditions --- .github/workflows/document-and-deploy.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/document-and-deploy.yaml b/.github/workflows/document-and-deploy.yaml index 9acb659..e41eab1 100644 --- a/.github/workflows/document-and-deploy.yaml +++ b/.github/workflows/document-and-deploy.yaml @@ -52,8 +52,8 @@ jobs: git commit -m 'Documentation' || echo "No changes to commit" git push origin || echo "No changes to commit" - - name: Deploy - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + - name: Deploy latest + if: github.ref == 'refs/heads/dev' (from dev) env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} run: | @@ -64,8 +64,8 @@ jobs: rsconnect::setAccountInfo(name=${{secrets.SHINY_LUKAS_ACCOUNT}}, token=${{secrets.SHINY_LUKAS_TOKEN}}, secret=${{secrets.SHINY_LUKAS_SECRET}}); rsconnect::deployApp(appName = 'CiteSource_latest', appDir = './inst/shiny-app/CiteSource', forceUpdate = TRUE)" - - name: Deploy release version conditionally - if: github.ref == 'refs/heads/dev' + - name: Deploy stable version (from main) + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' run: | R -e " rsconnect::deployApp(appName = 'CiteSource', appDir = './inst/shiny-app/CiteSource', forceUpdate = TRUE)"