Skip to content

update actions upload and download artifact version #145

update actions upload and download artifact version

update actions upload and download artifact version #145

Workflow file for this run

on:
push:
branches:
- main
name: build
jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- name: Setup R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::rmarkdown
any::bookdown
any::EML
any::dplyr
any::pander
any::tinytex
any::qpdf
- name: Render Book
run: sh _build.sh
- uses: actions/upload-artifact@v3
with:
name: _book
path: _book/
# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@main
- name: Download artifact
uses: actions/download-artifact@v3
with:
# Artifact name
name: _book # optional
# Destination path
path: _book # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: ${{ secrets.EMAIL }}
build_dir: _book # "_site/" by default