From 70846f5336f95d9acf6bbbd12dbd2692d78cf12b Mon Sep 17 00:00:00 2001 From: Gabriel Koppenstein <82903393+gab-k@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:52:09 +0100 Subject: [PATCH] Update pcb_render.yml --- .github/workflows/pcb_render.yml | 36 +++++++------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pcb_render.yml b/.github/workflows/pcb_render.yml index e7317dd..ea1a240 100644 --- a/.github/workflows/pcb_render.yml +++ b/.github/workflows/pcb_render.yml @@ -34,40 +34,20 @@ jobs: runs-on: ubuntu-latest needs: render-image - permissions: - pages: write - id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Checkout the repository - uses: actions/checkout@v4 - - - name: Set up git - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - - - name: Checkout gh-pages - run: | - git fetch --all # Ensure all branches are fetched - git checkout gh-pages - - name: Download pcb-images artifact uses: actions/download-artifact@v4 with: name: pcb-images path: images/ - - - name: Deploy to gh-pages branch (main) - run: | - cp -r images/* . # Copy the rendered images to the root directory - git add images/* - git commit -m "Deploy PCB images to gh-pages-dev" - git push origin gh-pages + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./images + publish_branch: gh-pages # Specify the target branch (gh-pages in this case) + destination_dir: img deploy-pages-dev: if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch