1
1
mirror of https://github.com/foxsen/archbase.git synced 2026-02-11 14:15:54 +08:00
Files
archbase/.github/workflows/deploy_bookdown.yml
2021-10-28 07:32:35 +08:00

52 lines
1.2 KiB
YAML

on:
push:
branches:
- main
name: renderbook
jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-renv@v1
with:
cache-version: 1
- name: Render Book
run: make
- uses: actions/upload-artifact@v1
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@master
- name: Download artifact
uses: actions/download-artifact@v1.0.0
with:
# Artifact name
name: _book # optional
# Destination path
path: _book # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: 2503799872@qq.com
build_dir: _book/