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

Removed link check #137

Merged
merged 7 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 2 additions & 21 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- uses: actions/setup-python@v4
with: {python-version: '3.x'}
with: {python-version: '3.11'}
- run: pip install -r requirements.txt pyyaml
- name: check CITATION.cff & .zenodo.json
run: |
Expand All @@ -39,16 +39,13 @@ jobs:
assert cff['url'] == zen['related_identifiers'][0]['identifier']
assert cff['keywords'] == zen['keywords']
EOF
- name: linkcheck
# https://jupyterbook.org/en/stable/reference/cli.html
run: jupyter-book build --builder linkcheck --warningiserror --nitpick --keep-going .
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- uses: actions/setup-python@v4
with: {python-version: '3.x'}
with: {python-version: '3.11'}
- id: pages
uses: actions/configure-pages@v3
- run: pip install -r requirements.txt
Expand All @@ -60,21 +57,6 @@ jobs:
jupyter-book build --builder dirhtml --warningiserror --nitpick --keep-going .
# fix https://github.com/executablebooks/jupyter-book/issues/2066
sed -ri 's#(.*link rel="canonical" href=".*)\.html(".*)#\1/\2#' _build/dirhtml/*/index.html
jupyter-book build --builder latex --warningiserror --nitpick --keep-going .
cd _build/latex
# fix contrib.rocks
mv state-of-open-source-ai contrib-rocks.svg
convert contrib-rocks.svg contrib-rocks.png || :
sed -ri 's/(.*includegraphics\{\{)state-of-open-source-ai(\}\}.*)/\1contrib-rocks.png\2/g' book.tex
# fix undefined in FreeFont
sed -ri \
-e 's/[🆕🌈🎉💪💬💻📝📥🔠🔌🛠␂↔️⚙️]//g' \
-e 's/🔴/☒/g' \
-e 's/🟡/☐/g' \
-e 's/🟢/☑/g' \
book.tex
# insert PDF cover
curl -fsSLO https://static.premai.io/book/cover.pdf
- uses: xu-cheng/latex-action@v3
with:
working_directory: _build/latex
Expand All @@ -88,7 +70,6 @@ jobs:
run: |
mkdir _site
mv _build/dirhtml _site/$SITE_PREFIX
mv _build/latex/book.pdf _site/$SITE_PREFIX.pdf
sed "s#DESTINATION#${{ steps.pages.outputs.base_url }}/$SITE_PREFIX#g" .redirect-template.html > _site/index.html
- uses: actions/upload-pages-artifact@v2
deploy:
Expand Down
10 changes: 3 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
jupyter-book
sphinx-last-updated-by-git
# TODO: remove after https://github.com/executablebooks/jupyter-book/pull/2048
docutils!=0.18.*,!=0.19.*,!=0.20.0
sphinx-subfigure
# TODO: remove after https://github.com/pydata/pydata-sphinx-theme/issues/1543
pydata-sphinx-theme!=0.14.2
jupyter-book==1.0.0
sphinx-last-updated-by-git==0.3.6
sphinx-subfigure==0.2.4
Loading