Skip to content

Commit

Permalink
feat: deploy do livro para GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriqueAJNB committed Jun 25, 2024
1 parent 7bb7e40 commit 1ae4703
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build e deploy do livro

on: [push]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Setup GitHub Actions
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Instalação jupyter-book
run: pip install jupyter-book

- name: Build do livro
run: jupyter-book build ./book

# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/_build/html
19 changes: 18 additions & 1 deletion poetry.lock

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

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ jupyter-book = "^1.0.0"

[tool.poetry.group.dev.dependencies]
taskipy = "^1.13.0"
ghp-import = "^2.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.taskipy.tasks]
build = { cmd = "jb build --all book", help = "runs all unit tests" }
build = { cmd = "jb build --all book", help = "build the book locally" }
deploy = { cmd = "task build && ghp-import -n -p -f ./book/_build/html", help = "deploy book to GitHub Pages" }

0 comments on commit 1ae4703

Please sign in to comment.