From 5110cc50a79446aee1ebc7368cdb67c79af7a090 Mon Sep 17 00:00:00 2001 From: Athanasia Monika Mowinckel Date: Sun, 16 Jul 2023 21:27:22 +0200 Subject: [PATCH] deploy based on branch --- .Rprofile | 1 - .github/workflows/build.yaml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.Rprofile b/.Rprofile index 649443b95..9e6303d7a 100644 --- a/.Rprofile +++ b/.Rprofile @@ -1,5 +1,4 @@ source("renv/activate.R") -renv::restore() # Project Renvironment in this case must take # precedent over user Renvironment. diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e665e5c02..82839ec5f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -144,6 +144,7 @@ jobs: deploy-production: name: Deploy production needs: build + if: github.ref == 'refs/heads/main' runs-on: ubuntu-22.04 steps: - name: Download Build Artifact @@ -162,6 +163,7 @@ jobs: deploy-preview: name: Deploy preview needs: build + if: github.ref != 'refs/heads/main' runs-on: ubuntu-22.04 steps: @@ -188,7 +190,6 @@ jobs: path: ${{ env.hugobd }} - name: Deploy Netlify - if: github.ref != 'refs/heads/main' env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}