Skip to content

Improve cli start-up speed #839

Improve cli start-up speed

Improve cli start-up speed #839

Workflow file for this run

#schema: https://github.com/softprops/github-actions-schemas/blob/master/workflow.json
name: "Documentation"
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
permissions:
id-token: write
actions: write
contents: read
packages: write
env:
ANNOY_COMPILER_ARGS: "-DANNOYLIB_MULTITHREADED_BUILD,-mno-avx512f"
jobs:
pre_job:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
paths_result: ${{ steps.skip_check.outputs.paths_result }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
if: ${{ !github.event.act }}
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
do_not_skip: '["workflow_dispatch"]'
paths_filter: |
main:
paths:
- 'src/pixelator/**'
- 'docs/**'
- '**/*.md'
- '**/*.rst'
docs:
name: "Build documentation"
runs-on: ubuntu-latest
needs:
- pre_job
if: needs.pre_job.outputs.should_skip == '{}' || !fromJSON(needs.pre_job.outputs.paths_result).main.should_skip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python environment
uses: ./.github/actions/setup-python
with:
python-version: "3.11"
- name: Create dependencies file
run: |
pip install poetry
poetry export --output requirements.txt --without-hashes --no-interaction --no-ansi --with dev
pip install -r requirements.txt
- name: Sphinx Build
run: |
sphinx-build -b html docs docs/_build
- name: Archive documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: |
docs/_build