forked from indigo-dc/orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (65 loc) · 2.16 KB
/
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
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
name: Build and publish REST API docs
# Controls when the action will run.
on:
# Triggers the workflow on push events but only for the master branch
push:
branches: [ master ]
create:
tags:
- v*-FINAL
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
#container:
#image: maven:3.5.4-jdk-8
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: olegtarasov/[email protected]
id: tagName
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: adopt
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.5.4
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: setup git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git fetch --all
- name: build docs
run: |
echo ${{ steps.tagName.outputs.tag }}
#git checkout gh-pages
#git merge --ff -s recursive -X theirs --commit -m "Merge remote-tracking branch" 'origin/master'
rm -rf apidocs
rm -rf restdocs
mvn clean javadoc:javadoc package -P restdocs -Deditorconfig.skip=true
- name: prepare docs folder
run: |
pwd
mkdir -p docs
cp -r apidocs restdocs docs/
ls -latr ./docs
#git add -A
#git commit -am "Update documentation"
#git push origin HEAD:gh-pages
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref != 'ref/head/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
# deploy the current public folder
# to <base url>/x.y.z version subfolder
publish_dir: ./docs
destination_dir: ${{ steps.tagName.outputs.tag }}