This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.83 KB
/
publish.yaml
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
name: Publish Documentation
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build docs from'
required: true
default: 'main'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Apicurio Website Checkout
run: |
mkdir website
cd website
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio.github.io.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Apicurio Playbook Checkout
run: |
mkdir docs-playbook
cd docs-playbook
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-docs-playbook.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/${{ github.event.inputs.branch }}
git pull
- name: Generate Project Documentation for Website
run: |
echo "********** Building Registry Documentation using Antora **********"
cd docs-playbook
docker pull apicurio/apicurio-docs-builder:latest
docker run -v $(pwd):/apicurio-docs-playbook apicurio/apicurio-docs-builder:latest
rm -rf ../website/registry/docs/*
cp -rf target/dist/* ../website/registry/docs/.
- name: Commit Project Website Changes
run: |
cd website
git add .
git commit -m "Automated update of Apicurio Registry documentation"
git push