Skip to content

Commit

Permalink
Update build_book.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizmilz authored Sep 13, 2023
1 parent b67fe13 commit d685e3e
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/build_book.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
on:
push:
branches: main
pull_request:
branches: main
branches: traducao-pt-2ed
# pull_request:
# branches: main
# to be able to trigger a manual build
workflow_dispatch:
schedule:
# run every day at 11 PM
- cron: '0 23 * * *'
# schedule:
# # run every day at 11 PM
# - cron: '0 23 * * *'

name: Render and deploy Book to Netlify

env:
isExtPR: ${{ github.event.pull_request.head.repo.fork == true }}
RUST_BACKTRACE: 1

jobs:
build-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
ref: traducao-pt-2ed

- name: Install Quarto
uses: quarto-dev/quarto-actions/install-quarto@v1
Expand All @@ -42,19 +40,13 @@ jobs:
run: |
quarto render
- name: Deploy to Netlify
if: contains(env.isExtPR, 'false')
id: netlify-deploy
uses: nwtgck/[email protected]
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
publish-dir: './_book'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
enable-pull-request-comment: false
enable-commit-comment: false
render: false
target: gh-pages
path: "_book/"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_2E }}
timeout-minutes: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions

0 comments on commit d685e3e

Please sign in to comment.