Merge pull request #1035 from onekey-sec/update_flake_lock_action #487
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: Documentation | |
on: | |
push: | |
branches: | |
- main | |
- docs | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Restore pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: pip-3.9 | |
- name: Upgrade pip and install poetry | |
run: python -m pip install --upgrade pip poetry | |
shell: bash | |
- name: Restore poetry cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pypoetry/cache | |
~/.cache/pypoetry/artifacts | |
key: poetry-cache-and-artifacts-3.9 | |
- name: Restore virtualenvs | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: venv-${{ hashFiles('poetry.lock') }}-3.9 | |
- name: Poetry install | |
run: poetry install --only docs | |
shell: bash | |
- name: Generate documentation | |
run: poetry run mkdocs gh-deploy --force |