microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2aee4d6af13e98be5b030fbf5d182b7408fe9216

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/deploy-docs.yml

82lines · modecode

1# Docusaurus documentation site deployment
2# Prerequisite: Enable GitHub Pages in repo Settings → Pages → Source: GitHub Actions
3# and allow the target branch in Settings → Environments → github-pages → Deployment branches
4
5name: Deploy Documentation Site
6
7on:
8 push:
9 branches:
10 - main
11 paths:
12 - 'docs/**'
13 - '.github/workflows/deploy-docs.yml'
14 workflow_dispatch:
15
16concurrency:
17 group: pages-deploy-${{ github.ref }}
18 cancel-in-progress: false
19
20permissions:
21 contents: read
22
23jobs:
24 test:
25 name: Docusaurus Tests
26 uses: ./.github/workflows/docusaurus-tests.yml
27 permissions:
28 contents: read
29 with:
30 soft-fail: false
31
32 build:
33 name: Build Docusaurus
34 needs: test
35 runs-on: ubuntu-latest
36 permissions:
37 contents: read
38 pages: write
39 steps:
40 - name: Checkout
41 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42 with:
43 persist-credentials: false
44 fetch-depth: 0
45
46 - name: Setup Node.js
47 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
48 with:
49 node-version: 24
50 cache: npm
51 cache-dependency-path: docs/docusaurus/package-lock.json
52
53 - name: Install dependencies
54 working-directory: docs/docusaurus
55 run: npm ci
56
57 - name: Build site
58 working-directory: docs/docusaurus
59 run: npm run build
60
61 - name: Configure Pages
62 uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
63
64 - name: Upload artifact
65 uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
66 with:
67 path: docs/docusaurus/build
68
69 deploy:
70 name: Deploy to GitHub Pages
71 needs: build
72 runs-on: ubuntu-latest
73 permissions:
74 pages: write
75 id-token: write
76 environment:
77 name: github-pages
78 url: ${{ steps.deployment.outputs.page_url }}
79 steps:
80 - name: Deploy to GitHub Pages
81 id: deployment
82 uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
83