Skip to content

Deploy to GitHub Pages #143

Deploy to GitHub Pages

Deploy to GitHub Pages #143

name: Deploy to GitHub Pages
on:
workflow_dispatch:
workflow_run:
workflows: ["Release"]
types:
- completed
permissions:
contents: write
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
environment: github-pages
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 20.12.2
- name: Install dependencies
run: yarn install --immutable
- name: Lint Documentation
run: yarn workspace openapi-qraft-website run lint
- name: Build website
run: yarn workspace openapi-qraft-website run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build