Skip to content

GH-Pages PR Deploy #1232

GH-Pages PR Deploy

GH-Pages PR Deploy #1232

name: GH-Pages PR Deploy
on:
workflow_run:
workflows: ["VeeR-EL2 CI"]
types:
- completed
jobs:
deploy:
name: PR Deploy
concurrency:
group: gh-pages
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
name: webpage
path: ./public.new
run_id: ${{ github.event.workflow_run.id }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public.new