Skip to content

Commit 994ec59

Browse files
committed
merge site-docs with antora and antora-ui
1 parent 5a6d944 commit 994ec59

File tree

139 files changed

+27308
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+27308
-20
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 'Antora Publish'
2+
description: 'Build and Publish an Antora documentation website'
3+
inputs:
4+
playbook:
5+
description: 'The playbook file.'
6+
required: false
7+
default: 'playbook.yml'
8+
artifact:
9+
description: 'Name of the artifact with the Antora website'
10+
required: false
11+
default: ''
12+
options:
13+
description: 'Extra antora options'
14+
required: false
15+
default: ''
16+
extensions:
17+
description: 'A comma separated list of antora extensions to install (ex: @antora/lunr-extension)'
18+
required: false
19+
default: ''
20+
publish_pages:
21+
description: 'Publish to GitHub Pages'
22+
required: false
23+
default: 'false'
24+
github_token:
25+
description: 'The GitHub token for GitHub Pages'
26+
required: false
27+
default: ''
28+
setup_only:
29+
description: 'If true, we only setup antora but do not run it'
30+
required: false
31+
default: 'false'
32+
33+
runs:
34+
using: "composite"
35+
steps:
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version: '16'
40+
41+
- name: Install package.json
42+
shell: bash
43+
run: |
44+
if test -f "package.json"; then
45+
npm install
46+
fi
47+
48+
- name: Install Antora
49+
shell: bash
50+
run: npm i antora
51+
52+
- name: Install Antora Extensions
53+
if: inputs.extensions != ''
54+
shell: bash
55+
run: |
56+
extensions=${{ inputs.extensions }}
57+
for extension in ${extensions//,/ }
58+
do
59+
npm i "$extension"
60+
done
61+
62+
- name: Generate Site
63+
if: inputs.setup_only != 'true'
64+
shell: bash
65+
run: npx antora ${{ inputs.options }} ${{ inputs.playbook }}
66+
67+
- name: Publish as Artifact
68+
if: inputs.artifact != '' && inputs.setup_only != 'true'
69+
uses: actions/upload-artifact@v3
70+
with:
71+
name: ${{ inputs.artifact }}
72+
path: build
73+
74+
- name: Publish to GitHub Pages
75+
if: inputs.github_token != '' && inputs.publish_pages != false && inputs.setup_only != 'true'
76+
uses: peaceiris/actions-gh-pages@v3
77+
with:
78+
github_token: ${{ inputs.github_token }}
79+
publish_dir: build

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Upload Antora Docs
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
pull_request:
7+
branches:
8+
- master
9+
- develop
10+
11+
concurrency:
12+
group: ${{format('publish-{0}:{1}', github.repository, github.ref)}}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
name: Publish Antora Docs
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Antora Setup
24+
uses: ./.github/actions/antora_publish
25+
with:
26+
setup_only: true
27+
28+
- name: Build
29+
run: |
30+
./libdoc.sh "${{ (startsWith(github.ref, 'refs/heads/develop') && 'develop') || 'master' }}"
31+
./sitedoc.sh "${{ (startsWith(github.ref, 'refs/heads/develop') && 'develop') || 'master' }}"
32+
33+
# - name: AWS Sync
34+
# if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/master'))
35+
# uses: jakejarvis/s3-sync-action@master
36+
# with:
37+
# args: --follow-symlinks --delete
38+
# env:
39+
# AWS_S3_BUCKET: ${{ (startsWith(github.ref, 'refs/heads/develop') && secrets.AWS_DEVELOP_S3_BUCKET) || secrets.AWS_MASTER_S3_BUCKET }}
40+
# AWS_ACCESS_KEY_ID: ${{ (startsWith(github.ref, 'refs/heads/develop') && secrets.AWS_DEVELOP_ACCESS_KEY_ID) || secrets.AWS_MASTER_ACCESS_KEY_ID }}
41+
# AWS_SECRET_ACCESS_KEY: ${{ (startsWith(github.ref, 'refs/heads/develop') && secrets.AWS_DEVELOP_SECRET_ACCESS_KEY) || secrets.AWS_MASTER_SECRET_ACCESS_KEY }}
42+
# AWS_REGION: 'us-east-2'
43+
# SOURCE_DIR: ${{ format('build/{0}', (startsWith(github.ref, 'refs/heads/develop') && 'develop') || 'master') }}
44+
# DEST_DIR: ${{ format('site/{0}', (startsWith(github.ref, 'refs/heads/develop') && 'develop') || 'master') }}
45+

.github/workflows/ui-release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Antora-UI bundle
2+
3+
on:
4+
push:
5+
branches: [ "master", "develop" ]
6+
pull_request:
7+
branches: [ "master", "develop" ]
8+
9+
concurrency:
10+
group: ${{format('ui-release-{0}:{1}', github.repository, github.ref)}}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') && github.event_name == 'push' }}
17+
permissions:
18+
contents: write
19+
20+
strategy:
21+
matrix:
22+
node-version: [18.x]
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- name: Build
33+
working-directory: antora-ui
34+
run: |
35+
npm install
36+
gulp bundle
37+
38+
- name: Bundle
39+
uses: svenstaro/[email protected]
40+
with:
41+
tag: ui-${{ github.ref_name }}
42+
file: antora-ui/build/ui-bundle.zip
43+
asset_name: ui-bundle.zip
44+
repo_token: ${{ secrets.GITHUB_TOKEN }}
45+
overwrite: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
antora
21
build
2+
temp/
3+
local.*
4+
node_modules/

0 commit comments

Comments
 (0)