From f8fcd77449888e33a52423bfc4f7fe49eaa55c31 Mon Sep 17 00:00:00 2001 From: Gabriel Koppenstein <82903393+gab-k@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:27:15 +0100 Subject: [PATCH] Update pcb_render.yml --- .github/workflows/pcb_render.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pcb_render.yml b/.github/workflows/pcb_render.yml index 9af597b..e445521 100644 --- a/.github/workflows/pcb_render.yml +++ b/.github/workflows/pcb_render.yml @@ -51,11 +51,15 @@ jobs: git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" - - name: Create or update gh-pages branch (main) + - name: Download pcb-images artifact + uses: actions/download-artifact@v3 + with: + name: pcb-images + path: images/ + + - name: Deploy to gh-pages branch (main) run: | - git fetch origin gh-pages || echo "gh-pages branch does not exist" - git checkout -b gh-pages || git checkout gh-pages - git reset --hard origin/gh-pages + git checkout gh-pages cp -r images/* . # Copy the rendered images to the root directory git add . git commit -m "Deploy PCB images to gh-pages" @@ -83,11 +87,15 @@ jobs: git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" - - name: Create or update gh-pages-dev branch (dev) + - name: Download pcb-images artifact + uses: actions/download-artifact@v3 + with: + name: pcb-images + path: images/ + + - name: Deploy to gh-pages-dev branch (dev) run: | - git fetch origin gh-pages-dev || echo "gh-pages-dev branch does not exist" - git checkout -b gh-pages-dev || git checkout gh-pages-dev - git reset --hard origin/gh-pages-dev + git checkout gh-pages-dev cp -r images/* . # Copy the rendered images to the root directory git add . git commit -m "Deploy PCB images to gh-pages-dev"