Update pcb_render.yml

This commit is contained in:
Gabriel Koppenstein authored and GitHub committed 2024-11-26 16:52:09 +01:00
1 parent babe18c758
commit 70846f5336
1 file changed
+7 -27
+7 -27
View File
@@ -34,40 +34,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: render-image needs: render-image
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps: 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 - name: Download pcb-images artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: pcb-images name: pcb-images
path: images/ path: images/
- name: Deploy to gh-pages branch (main) - name: Deploy
run: | uses: peaceiris/actions-gh-pages@v3
cp -r images/* . # Copy the rendered images to the root directory with:
git add images/* github_token: ${{ secrets.GITHUB_TOKEN }}
git commit -m "Deploy PCB images to gh-pages-dev" publish_dir: ./images
git push origin gh-pages publish_branch: gh-pages # Specify the target branch (gh-pages in this case)
destination_dir: img
deploy-pages-dev: deploy-pages-dev:
if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch if: github.ref == 'refs/heads/dev' # Only deploy on 'dev' branch