Update 02_introduction.md #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
pull_request: | ||
branches: [ cicd-issue-gh-pages_2.4 ] | ||
types: [ closed ] | ||
name: renderbook | ||
env: | ||
Check failure on line 8 in .github/workflows/renderbook.yml GitHub Actions / renderbookInvalid workflow file
|
||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | ||
jobs: | ||
bookdown: | ||
name: Render-Book | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: cicd-issue-gh-pages_2.4 | ||
- uses: r-lib/actions/setup-r@v1 | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
- name: Install rmarkdown | ||
run: Rscript -e 'install.packages(c("rmarkdown","bookdown","HelpersMG","readr"))' | ||
- uses: r-lib/actions/setup-tinytex@v1 | ||
- name : install tinytex | ||
run: tlmgr --version | ||
- name: Render Book | ||
run: | | ||
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook", output_dir="docs")' | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: docs | ||
path: docs/ | ||
# deploy to gh pages yml | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
needs: bookdown | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
with: | ||
persist-credentials: false | ||
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder. | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: docs | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: cicd-issue-gh-pages_2.4 # The branch the action should deploy to. | ||
FOLDER: docs | ||
TARGET_FOLDER: docs # The folder the action should deploy. | ||
CLEAN: true | ||
PRESERVE: true | ||