-
Notifications
You must be signed in to change notification settings - Fork 47
71 lines (69 loc) · 2.21 KB
/
publish_documentation.yaml
File metadata and controls
71 lines (69 loc) · 2.21 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
name: publish-otoroshi-documentation
on:
workflow_dispatch:
inputs:
version_from:
description: "Current version (ie. 16.12.0-dev)"
version_to:
description: "Published version (ie. 16.11.2)"
jobs:
release-otoroshi:
name: publish-otoroshi-documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup jdk11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: sbt/setup-sbt@v1.1.5
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: setup git
run: |
git config --global user.email "otoroshi-bot-github-actions@users.noreply.github.com"
git config --global user.name "otoroshi-bot-github-actions"
git config --global --list
- name: Setup xvfb for screen 0
run: |
Xvfb :1 -screen 0 1600x1200x24 &
- name: change-version-for-publication
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_FROM: ${{ inputs.version_from }}
VERSION_TO: ${{ inputs.version_to }}
DISPLAY: :1
run: |
export WHERE=$(pwd)
node ./scripts/release/change-doc-version-github-action.js
- name: run-doc-process
id: run-doc-process
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_FROM: ${{ inputs.version_from }}
VERSION_TO: ${{ inputs.version_to }}
DISPLAY: :1
run: |
export WHERE=$(pwd)
sh ./scripts/doc.sh all
- name: change-version-back
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_FROM: ${{ inputs.version_to }}
VERSION_TO: ${{ inputs.version_from }}
DISPLAY: :1
run: |
export WHERE=$(pwd)
node ./scripts/release/change-doc-version-github-action.js
- name: push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPLAY: :1
run: |
export WHERE=$(pwd)
git add --all
git commit -am 'publish documentation'
git pull --rebase origin master
git push origin master