ci: fix secret passing #11
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: build-docs | ||
on: | ||
workflow_call: | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
push: | ||
branches: | ||
- prod | ||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Python env | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- name: Install Poetry | ||
run: | | ||
pip install poetry==1.5.1 | ||
poetry config virtualenvs.create false | ||
- name: Install autodisc-server-libs dependencies | ||
working-directory: ./services/base/AutoDiscServer/libs | ||
run: poetry install --with docs | ||
- name: Generate doc | ||
run: > | ||
pdoc | ||
--docformat google | ||
--logo https://flowers.inria.fr/wp/wp-content/uploads/2013/07/ErgoRobotFondationCartier.jpg.jpg | ||
--favicon https://flowers.inria.fr/wp/wp-content/uploads/2013/07/ErgoRobotFondationCartier.jpg.jpg | ||
--output-dir ./docs/adtool | ||
./services/base/AutoDiscServer/libs/auto_disc | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/adtool |