Repository navigation
97 lines (85 loc) · 3 KB
/
Copy pathdocs.yml
File metadata and controls
97 lines (85 loc) · 3 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
name: Publish versioned documentation
on:
workflow_run:
workflows: [Continuous Integration]
types: [completed]
schedule:
- cron: '23 6 * * *'
workflow_dispatch:
inputs:
retry_failed:
description: Retry previously failed release documentation builds
type: boolean
default: false
permissions:
contents: read
concurrency:
group: pages
cancel-in-progress: false
jobs:
publish:
if: >-
github.repository == 'connectbot/cbssh' &&
(github.event_name != 'workflow_run' ||
(github.event.workflow_run.event == 'push' &&
(github.event.workflow_run.head_branch == 'main' || startsWith(github.event.workflow_run.head_branch, 'v') || contains(github.event.workflow_run.head_branch, '.'))))
runs-on: ubuntu-latest
timeout-minutes: 180
permissions:
contents: write
actions: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout source from main
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
fetch-depth: 0
fetch-tags: true
- name: Set up JDK
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: zulu
java-version: '17'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
with:
validate-wrappers: true
dependency-graph: disabled
- name: Reconcile and save documentation archive
id: docs
uses: connectbot/actions/docs@main
env:
GH_TOKEN: ${{ github.token }}
with:
retry-failed: ${{ inputs.retry_failed || false }}
publish: 'true'
require-ci: 'true'
- name: Preserve build logs
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: documentation-build-logs
path: ${{ runner.temp }}/docs-logs
if-no-files-found: ignore
- name: Set up Pages
if: steps.docs.outputs.ready == 'true'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Upload complete site
if: steps.docs.outputs.ready == 'true'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: ${{ runner.temp }}/docs-site
- name: Deploy to GitHub Pages
if: steps.docs.outputs.ready == 'true'
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
- name: Report incomplete documentation
if: steps.docs.outputs.ready != 'true' || steps.docs.outputs.failures != '0'
run: |
echo 'Some documentation builds failed. Successful versions were saved; see the job summary and build logs.'
exit 1