From bbd9b4820931dd9c95ddfc49de888df170233ffd Mon Sep 17 00:00:00 2001 From: ctmbl Date: Wed, 25 Oct 2023 09:43:46 +0200 Subject: [PATCH] Test deploy job from build workflow --- .github/workflows/build.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1988c52..143b80f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,10 @@ on: # Runs on pull requests to check that the website is building without errors pull_request: + # Runs on push/merge to main to deploy the new website + push: + branches: [main] + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -29,3 +33,18 @@ jobs: with: name: build path: ./build/blog + + deploy: + needs: [build] + if: ${{ github.event_name == "push" }} + runs-on: ubuntu-latest + steps: + - name: 🛠️ Setup build directory + run: | + mkdir -p build/blog + - name: 📥 Download build Artifacts + uses: actions/download-artifact@v3 + with: + name: build + path: build/blog + - run: tree