Skip to content

Commit

Permalink
update deploy github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisbader committed Nov 3, 2024
1 parent a7837c7 commit b630425
Showing 1 changed file with 34 additions and 29 deletions.
63 changes: 34 additions & 29 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,54 @@ jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "Clone repository"
uses: actions/checkout@v4

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
- name: "Set up Python 3.9"
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: "3. Install pandoc"
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
sudo apt-get install -y pandoc
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip compile requirements/dev-all.txt > requirements-latest.txt
# downloading gradle multiple times in parallel can yield to connection errors
- name: "4. Cache gradle distribution"
uses: actions/cache@v2
# only restore cache but do not upload
- name: "Restore cached python environment"
uses: actions/cache/restore@v4
id: pythonenv-cache
with:
path: ~/.gradle/wrapper/dists
key: release-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}

- name: "4.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: release-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "Install pandoc"
run: |
sudo apt-get install -y pandoc
- name: "5. Setup pip"
- name: "Setup Pip"
run: |
./gradlew setupPip
python -m pip install --upgrade pip
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: release-${{ runner.os }}-pip-${{ hashFiles('requirements/core.txt', 'requirements/release.txt') }}
restore-keys: |
release-${{ runner.os }}-pip-
- name: "Install Dependencies"
run: |
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt
- name: "Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "Install Locally"
run: |
pip install .
- name: "7. Build docs"
- name: "Build docs"
run: |
./gradlew buildDocs
make --directory ./docs build-all-docs
- name: "8. Publish documentation to gh-pages"
- name: "Publish documentation to gh-pages"
uses: s0/[email protected]
env:
REPO: self
Expand Down

0 comments on commit b630425

Please sign in to comment.