From cf2383d42734241012be9acd909d2b717d7ac189 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Tue, 13 Aug 2024 07:59:29 +0000 Subject: [PATCH] Trying a different approach using enviroments --- .github/workflows/pages.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index efeb830..bc726ba 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,4 @@ -name: Deploy Jekyll site to Pages (Testing) +name: Deploy Jekyll site to Pages on: push: @@ -26,7 +26,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.3' + ruby-version: '3.1' bundler-cache: true cache-version: 0 - name: Setup Pages @@ -42,11 +42,8 @@ jobs: deploy: runs-on: ubuntu-latest needs: build + environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'testing' }} steps: - - name: Checkout - uses: actions/checkout@v4 - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - with: - branch: ${{ github.ref == 'refs/heads/main' && 'gh-pages' || 'gh-pages-testing' }} \ No newline at end of file