Skip to content

trigger-workflow-2

trigger-workflow-2 #24

Workflow file for this run

name: pkgdown
on:
repository_dispatch:
types: [trigger-workflow-2]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container: rformassspectrometry/metabonaut:latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Install Quarto
run: |
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.57/quarto-1.5.57-linux-amd64.deb
sudo dpkg -i quarto-1.5.57-linux-amd64.deb
- name: Verify Quarto Installation
run: quarto --version
- name: Install rcmdcheck
run: |
install.packages('rcmdcheck')
shell: Rscript {0}
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'error', check_dir = 'check')"
shell: bash {0}
- name: Install deploy dependencies
run: |
apt-get update
apt-get -y install rsync
- name: Install pkgdown
if: github.ref == 'refs/heads/main'
run: |
install.packages('pkgdown')
shell: Rscript {0}
- name: Install package
if: github.ref == 'refs/heads/main'
run: R CMD INSTALL .
- name: Deploy package
if: github.ref == 'refs/heads/main'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git config --global --add safe.directory /__w/metabonaut/metabonaut
Rscript -e "pkgdown::build_article('a-end-to-end-untargeted-metabolomics', new_process = FALSE, quiet = FALSE)"
Rscript -e "pkgdown::deploy_to_branch(lazy = TRUE, new_process = FALSE, install = FALSE)"
shell: bash {0}
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
## at least one locally before this will work. This creates the gh-pages
## branch (erasing anything you haven't version controlled!) and
## makes the git history recognizable by pkgdown.