Skip to content

Commit 5d89cca

Browse files
aberniergsimone
andauthored
ci: Add GitHub Actions workflow for documentation build (#568)
Co-authored-by: Gianmarco <[email protected]>
1 parent 7608add commit 5d89cca

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/docs.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build documentation and deploy to GitHub Pages
2+
on:
3+
push:
4+
branches: ['main']
5+
workflow_dispatch:
6+
7+
# Cancel previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
uses: pmndrs/docs/.github/workflows/build.yml@v2
15+
with:
16+
mdx: 'docs'
17+
libname: 'leva'
18+
libname_short: 'leva'
19+
home_redirect: '/getting-started/introduction'
20+
icon: '🌋'
21+
# logo: '/logo.jpg'
22+
github: 'https://github.com/pmndrs/leva'
23+
# discord: 'https://discord.com/channels/740090768164651008/740093168770613279'
24+
25+
deploy:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
29+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
30+
permissions:
31+
pages: write # to deploy to Pages
32+
id-token: write # to verify the deployment originates from an appropriate source
33+
34+
# Deploy to the github-pages environment
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
39+
steps:
40+
- id: deployment
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)