Skip to content

Commit

Permalink
use GHA for pushing page
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Aug 14, 2024
1 parent f33dd70 commit 4cf0dbb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/deploy_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
publish_book:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
Expand All @@ -16,4 +19,16 @@ jobs:
environments: doc

- name: Build and publish the book
run: pixi run -e doc publish-book
run: pixi run -e doc build-book

# Upload the book's HTML as an artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "book/_build/html"

# Deploy the book's HTML to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

23 changes: 0 additions & 23 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ black = "*"

[feature.doc.dependencies]
jupyter-book = "*"
ghp-import = ">=2.1.0,<3"

[feature.doc.tasks]
convert-to-notebooks = { cmd = "jupytext --to notebook --execute python_files/*.py" }
build-book = { cmd = "jupyter-book build book", depends-on = ["convert-to-notebooks"] }
publish-book = { cmd = "ghp-import -n -p -f book/_build/html", depends-on = ["build-book"] }

[environments]
lint = ["lint"]
Expand Down

0 comments on commit 4cf0dbb

Please sign in to comment.