adding deploy docs command

This commit is contained in:
Kacper Kula 2024-05-01 23:00:48 +01:00
parent 0e57c7bda2
commit 42654a7cc7

56
.github/workflows/deploy-docs.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: Deploy docs to Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with VitePress
run: |
pnpm run docs:build
touch docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2