Skip to content

Deploy Visual Reporter to GitHub Pages #4

Deploy Visual Reporter to GitHub Pages

Deploy Visual Reporter to GitHub Pages #4

name: Deploy Visual Reporter to GitHub Pages
on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@v4
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
- name: 🟢 Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: 🧩 Install Dependencies
run: pnpm pnpm.install.workaround
- name: 🏗️ Build
working-directory: packages/visual-reporter
run: |
pnpm build
pnpm script:prepare.report
env:
GITHUB_PAGES: "/visual-testing/"
- name: ⚙️ Setup Pages
uses: actions/configure-pages@v5
- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "packages/visual-reporter/build/client"
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4