-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: revert old docs pipeline (#4836)
- Loading branch information
Showing
1 changed file
with
18 additions
and
32 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 |
---|---|---|
@@ -1,58 +1,44 @@ | ||
name: Deploy documentation | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- docs | ||
|
||
jobs: | ||
main: | ||
test: | ||
name: Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2022-08-22 | ||
components: rust-docs | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
cache-dependency-path: 'py-polars/docs/requirements-docs.txt' | ||
|
||
- name: Install Python dependencies | ||
- name: Install dependencies | ||
working-directory: py-polars/docs | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements-docs.txt | ||
- name: Build Python documentation | ||
- name: Build python reference | ||
working-directory: py-polars/docs | ||
run: make html | ||
|
||
- name: Set up Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2022-08-22 | ||
components: rust-docs | ||
|
||
- name: Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build Rust documentation | ||
- name: deploy docs | ||
env: | ||
RUSTFLAGS: --cfg docsrs | ||
run: cargo doc --features=docs-selection --package polars | ||
|
||
- name: Prepare deployment | ||
run: | | ||
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html | ||
mv py-polars/docs/build/html target/doc/py-polars | ||
- name: Deploy | ||
run: | | ||
ghp-import -n target/doc | ||
set -e | ||
cargo doc --features=docs-selection --package polars && \ | ||
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html && \ | ||
mkdir target/doc/py-polars | ||
cp -r py-polars/docs/build/html target/doc/py-polars | ||
echo ghp-import step | ||
ghp-import -n target/doc && \ | ||
git push -qf https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git gh-pages | ||
# Make sure documentation artifacts are not cached | ||
- name: Clean up docs | ||
run: rm -rf target/docs |