This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (85 loc) · 2.55 KB
/
docs-cf-pages-publish.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
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
99
name: Publish Writerside and JSDoc documentation to Cloudflare Pages
on:
push:
paths:
- 'docs/**'
- 'built_docs/**'
branches:
- main
- 'Sprint-[0-9]*'
- 'patch-[0-9]*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
env:
WRS_INSTANCE: docs/ucwa
WRS_ARTIFACT: webHelpUCWA2-all.zip
WRS_DOCKER_VERSION: 232.10275
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build jsdoc documentation
uses: andstor/jsdoc-action@v1
with:
source_dir: .
recurse: true
output_dir: ./built_docs/jsdoc
- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.WRS_INSTANCE }}
artifact: ${{ env.WRS_ARTIFACT }}
docker-version: ${{ env.WRS_DOCKER_VERSION }}
- name: Upload Writerside documentation artifact
uses: actions/upload-artifact@v3
with:
name: wrs_docs
path: |
artifacts/${{ env.WRS_ARTIFACT }}
artifacts/report.json
retention-days: 7
- name: Test Writerside documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.WRS_INSTANCE }}
- name: Unzip Writerside artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./built_docs/handbook
- name: Archive documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: built_docs
retention-days: 7
deploy:
name: Publish to Cloudflare Pages
runs-on: ubuntu-latest
needs: build
env:
CLOUDFLARE_PAGES_PROJECT_NAME: 'docs-svfmc'
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download documentation
uses: actions/download-artifact@v3
with:
name: docs
path: built_docs
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
id: deploy-to-cloudflare-pages
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ env.CLOUDFLARE_PAGES_PROJECT_NAME }}
directory: built_docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}