publish-otoroshi-documentation #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: setup git | |
run: | | |
git config --global user.email "[email protected]" | |
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 |