update examples in git-version-control section #400
This file contains hidden or 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: | |
push: | |
branches: | |
- devel | |
pull_request: | |
branches: | |
- devel | |
name: build_deploy | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: bioconductor/bioconductor_docker:devel | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: apt-get update | |
run: | | |
apt-get update -y | |
- name: Set up pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install TinyTeX | |
run: | | |
install.packages('tinytex') | |
tinytex::install_tinytex() | |
shell: Rscript {0} | |
- name: Install dependencies | |
run: | | |
install.packages(c('remotes', 'BiocManager')) | |
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories()) | |
BiocManager::install(update = TRUE, ask = FALSE, Ncpus = 2L) | |
shell: Rscript {0} | |
- name: Session info | |
run: | | |
install.packages('sessioninfo') | |
options(width = 100) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} | |
# - name: Render book (git) | |
# run: | | |
# bookdown::render_book('index.Rmd', 'bookdown::gitbook') | |
# shell: Rscript {0} | |
# - name: Render book (pdf) | |
# run: | | |
# bookdown::render_book('index.Rmd', 'bookdown::pdf_book') | |
# shell: Rscript {0} | |
# - name: Render book (epub) | |
# run: | | |
# bookdown::render_book('index.Rmd', 'bookdown::epub_book') | |
# shell: Rscript {0} | |
- name: Render book (bs4_book) | |
run: | | |
bookdown::render_book('index.Rmd', 'bookdown::bs4_book') | |
shell: Rscript {0} | |
- name: Copy docs/ subdirectory to book | |
run: | | |
cp -R docs _book/ | |
- name: Upload bookdown artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _book | |
deploy: | |
needs: build | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
if: github.event_name == 'push' && github.ref == 'refs/heads/devel' | |
id: deployment | |
uses: actions/deploy-pages@v4 | |