[CI] Enable sub workflow call (#1406)
Remove duplicates of actions for documentation
This commit is contained in:
1 parent
5297dff7bb
commit
a43f0605ed
2 files changed
+3
-33
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
name: Create and publish documentation
|
name: Create and publish documentation
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
jobs:
|
jobs:
|
||||||
documentation:
|
documentation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -38,36 +38,5 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
release-url: ${{ steps.release-id.outputs.upload_url }}
|
release-url: ${{ steps.release-id.outputs.upload_url }}
|
||||||
allow-overwrite: true
|
allow-overwrite: true
|
||||||
|
call-workflow-passing-data:
|
||||||
documentation:
|
uses: ./.github/workflows/manual_docs.yml
|
||||||
needs: build-upload
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Create the documentation and deploy it to GitHub Pages
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "14.x"
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.7"
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install requests pandas markdown pytablereader tabulate
|
|
||||||
npm install
|
|
||||||
- name: Set version tag from git
|
|
||||||
run: sed -i "s/version_tag/${GITHUB_REF#refs/tags/}/g" docs/.vuepress/config.js
|
|
||||||
- name: Build documentation
|
|
||||||
run: |
|
|
||||||
python ./scripts/generate_board_docs.py
|
|
||||||
python ./scripts/gen_wu.py ${GITHUB_REPOSITORY}
|
|
||||||
npm run docs:build
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./docs/.vuepress/dist
|
|
||||||
cname: docs.openmqttgateway.com
|
|
||||||
Reference in new issue
Block a user