-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7837c7
commit b630425
Showing
1 changed file
with
34 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|