Skip to content

Deploy

Deploy #335

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows:
- CI
types:
- completed
concurrency:
group: deploy-pages
cancel-in-progress: true
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Download dist artifact
uses: actions/download-artifact@v5
with:
name: dist
path: dist
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Download screenshot artifact
uses: actions/download-artifact@v5
with:
name: playwright-chromium-artifacts
path: artifacts
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Move screenshots to dist/docs
run: |
mkdir -p dist/docs
mv artifacts/test-results/demo.png dist/docs/app.png
mv artifacts/test-results/mobile-app-overview.png dist/docs/mobile-app-overview.png
mv artifacts/test-results/mobile-app-log.png dist/docs/mobile-app-log.png
- uses: actions/upload-pages-artifact@v4
with:
path: dist
- uses: actions/deploy-pages@v4
id: deploy