Create deploy-docs.yml

This commit is contained in:
Faisal Salman 2023-04-11 10:59:46 +07:00 committed by GitHub
parent 801c2409b3
commit 2fb0c72898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -0,0 +1,33 @@
name: Deploy VitePress
on:
workflow_dispatch: {}
push:
branches:
- gh-pages
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- name: Build
run: npm run docs:build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/v2/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1