2022-10-31 21:44:09 +05:30
|
|
|
name: Deploy Vitepress docs to Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
# Runs on pushes targeting the default branch
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
# Allow one concurrent deployment
|
|
|
|
concurrency:
|
|
|
|
group: 'pages'
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Build job
|
2023-07-02 10:14:35 +05:30
|
|
|
build-docs:
|
2022-10-31 21:44:09 +05:30
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-08-24 09:26:49 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2022-10-31 21:54:57 +05:30
|
|
|
|
2024-08-24 09:26:49 +00:00
|
|
|
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
2022-10-31 21:54:57 +05:30
|
|
|
|
2022-10-31 21:44:09 +05:30
|
|
|
- name: Setup Node.js
|
2024-10-08 09:11:33 +00:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-10-31 21:44:09 +05:30
|
|
|
with:
|
|
|
|
cache: pnpm
|
2024-01-30 20:44:39 +05:30
|
|
|
node-version-file: '.node-version'
|
2022-10-31 21:44:09 +05:30
|
|
|
|
|
|
|
- name: Install Packages
|
|
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
|
|
|
|
- name: Setup Pages
|
2024-08-24 09:26:49 +00:00
|
|
|
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
|
2022-10-31 21:44:09 +05:30
|
|
|
|
|
|
|
- name: Run Build
|
|
|
|
run: pnpm --filter mermaid run docs:build:vitepress
|
|
|
|
|
|
|
|
- name: Upload artifact
|
2024-08-24 09:26:49 +00:00
|
|
|
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
|
2022-10-31 21:44:09 +05:30
|
|
|
with:
|
|
|
|
path: packages/mermaid/src/vitepress/.vitepress/dist
|
|
|
|
|
|
|
|
# Deployment job
|
2023-07-02 10:14:35 +05:30
|
|
|
deploy-docs:
|
2022-10-31 21:44:09 +05:30
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-02 10:14:35 +05:30
|
|
|
needs: build-docs
|
2022-10-31 21:44:09 +05:30
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
2024-08-24 09:26:49 +00:00
|
|
|
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|