Skip to content

Commit

Permalink
chore: realiza build do livro ao abrir PR
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriqueAJNB committed Oct 12, 2024
1 parent 379c23c commit ad42570
Showing 1 changed file with 52 additions and 30 deletions.
82 changes: 52 additions & 30 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
name: Build e deploy do livro

on: [push]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
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
name: Build e deploy do livro

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
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

build-and-deploy:
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
- name: Execute build steps
uses: ./.github/workflows/build_and_deploy.yml@build

# 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

build-only:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: build
steps:
- name: Execute build steps
uses: ./.github/workflows/build_and_deploy.yml@build

0 comments on commit ad42570

Please sign in to comment.