-
Notifications
You must be signed in to change notification settings - Fork 10
98 lines (80 loc) · 2.81 KB
/
docs.yml
File metadata and controls
98 lines (80 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Documentation
on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
actions: read
concurrency:
group: 'pages'
cancel-in-progress: false
env:
MODULE_NAME: Convert
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Download module artifact from CI
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e
with:
name: Convert-Module-Universal
path: Artifacts/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build module (manual trigger only)
if: ${{ github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: |
./build.ps1 -Rust -Build -Targets @('x86_64-unknown-linux-gnu')
mkdir -p src/Convert/Private/bin/x64
cp lib/target/x86_64-unknown-linux-gnu/release/libconvert_core.so src/Convert/Private/bin/x64/
./build.ps1 -PowerShell -Build
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
- name: Cache PowerShell modules
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: ~/.local/share/powershell/Modules
key: ${{ runner.os }}-psmodules-${{ hashFiles('install_modules.ps1') }}
- name: Install PowerShell modules
shell: pwsh
run: ./install_modules.ps1
- name: Generate function documentation
shell: pwsh
run: ./.build/Invoke-DocumentationGeneration.ps1 -Force
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.11'
cache: 'pip'
- name: Install MkDocs dependencies
run: pip install -r docs/requirements.txt
- name: Build MkDocs site
run: mkdocs build --strict
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: site/
deploy-docs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build-docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e