Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(hugr-py): build and publish docs #1253

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
build:
name: Build docs.
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hugr-py
steps:
- uses: actions/checkout@v4
- name: Install poetry
Expand All @@ -43,7 +46,7 @@ jobs:
- name: Upload artifact.
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build/main
path: ./hugr-py/docs/build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the default directory is ./hugr-py, I think this is just ./docs/build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default only applies for run steps


publish:
name: Publish docs.
Expand Down
9 changes: 9 additions & 0 deletions hugr-py/docs/_static/_redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to main branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./main/index.html">
<link rel="canonical" href="https://cqcl.github.io/hugr/main/index.html">
</head>
</html>
3 changes: 2 additions & 1 deletion hugr-py/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
mkdir build

touch build/.nojekyll # Disable jekyll to keep files starting with underscores

# copy redirect file
cp ./_static/_redirect.html ./build/index.html
sphinx-multiversion ./api-docs ./build
Loading