forked from gui-cs/Terminal.Gui
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.07 KB
/
api-docs.yml
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
name: Build and publish API docs
on:
push:
# only publish v2 (main or develop); v2 is published via the Terminal.GuiV2Docs repo
branches: [main, develop]
permissions:
id-token: write
pages: write
jobs:
# Single deploy job since we're just deploying
deploy:
name: Build and Deploy API docs to github-pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: DocFX Build
working-directory: docfx
run: |
dotnet tool install -g docfx
$env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
docfx metadata
docfx build
continue-on-error: false
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docfx/_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}