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

move site to book.premai.io/state-of-open-source-ai #24

Merged
merged 1 commit into from
Aug 25, 2023
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
12 changes: 9 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ permissions:
pages: write
id-token: write
concurrency: {group: "${{ github.ref }}-pages", cancel-in-progress: true}
env:
SITE_PREFIX: state-of-open-source-ai
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,7 +23,7 @@ jobs:
- run: pip install -r requirements.txt
- name: jupyter-book build
run: |
sed -ri 's#^(\s*baseurl:).*#\1 ${{ steps.pages.outputs.base_url }}#g' _config.yml
sed -ri 's#^(\s*baseurl:).*#\1 ${{ steps.pages.outputs.base_url }}/'$SITE_PREFIX'#g' _config.yml
# https://jupyterbook.org/en/stable/reference/cli.html
jupyter-book build --builder linkcheck --warningiserror --nitpick --keep-going .
jupyter-book build --builder dirhtml --warningiserror --nitpick --keep-going .
Expand All @@ -32,9 +34,13 @@ jobs:
root_file: book.tex
args: -pdf -dvi- -ps- -file-line-error -f -interaction=nonstopmode
continue-on-error: true
- run: cp _build/latex/book.pdf _build/dirhtml/
- name: prepare _site pages
run: |
mkdir _site
mv _build/dirhtml _site/$SITE_PREFIX
mv _build/latex/book.pdf _site/$SITE_PREFIX/
sed "s#DESTINATION#${{ steps.pages.outputs.base_url }}/$SITE_PREFIX#g" .redirect-template.html > _site/index.html
- uses: actions/upload-pages-artifact@v2
with: {path: _build/dirhtml}
deploy:
if: github.ref == 'refs/heads/main'
environment:
Expand Down
11 changes: 11 additions & 0 deletions .redirect-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en-GB">
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
<link rel="canonical" href="DESTINATION">
<script>location="DESTINATION"</script>
<meta http-equiv="refresh" content="0; url=DESTINATION">
<meta name="robots" content="noindex">
<h1>Redirecting&hellip;</h1>
<a href="DESTINATION">Click here if you are not redirected.</a>
</html>
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book.premai.io
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

*Clarity in the current fast-paced mess of Open Source innovation.*

- Book: https://premAI-io.github.io/state-of-open-source-ai
+ [Contributing Guide](https://premAI-io.github.io/state-of-open-source-ai/#contributing)
- Book: https://book.premai.io/state-of-open-source-ai
+ [Contributing Guide](https://book.premai.io/state-of-open-source-ai/#contributing)
- Community
+ [Discord](https://discord.com/invite/kpKk6vYVAn)
+ [Twitter](https://twitter.com/premai_io)
Expand Down
Loading