Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-dancers-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@pmndrs/docs': major
---

Add docs.yml workflow for GitHub Pages deployment
55 changes: 55 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build documentation and deploy to GitHub Pages
on:
push:
branches: ['main']
workflow_dispatch:

# Cancel previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: read
pages: write
id-token: write
uses: pmndrs/docs/.github/workflows/build.yml@main
with:
mdx: 'docs'
libname: 'Poimandres'
libname_short: 'pmndrs'
libname_dotsuffix_label: 'docs'
libname_dotsuffix_href: 'https://pmnd.rs'
home_redirect: '/getting-started/introduction'
icon: '🖨️'
logo: 'gutenberg.jpg'
github: 'https://github.com/pmndrs/docs'
theme_primary: '#323e48'
theme_scheme: 'tonalSpot'
theme_contrast: '0'
theme_note: '#1f6feb'
theme_tip: '#238636'
theme_important: '#8957e5'
theme_warning: '#d29922'
theme_caution: '#da3633'
docker_tag: '3'

deploy:
needs: build
runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
uses: actions/deploy-pages@v4