Skip to content

Move PTAXSIM DB file to runner temp dir #114

Move PTAXSIM DB file to runner temp dir

Move PTAXSIM DB file to runner temp dir #114

Workflow file for this run

on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master]
name: pkgdown
jobs:
build-pkgdown-site:
runs-on: ubuntu-latest
# Required for OIDC access to S3
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website
- name: Prepare PTAXSIM database
id: prep_ptaxsim_db
uses: ./.github/actions/prepare-ptaxsim
with:
ASSUMED_ROLE: ${{ secrets.AWS_IAM_ROLE_TO_ASSUME_ARN }}
- name: Set PTAXSIM database path
run: echo "PTAXSIM_DB_PATH=${{ steps.prep_ptaxsim_db.outputs.PTAXSIM_DB_DIR }}/ptaxsim.db" >> $GITHUB_ENV
shell: bash
- name: Build pkgdown site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: Configure pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'
deploy:
if: contains(fromJSON('["main", "master"]'), github.ref_name) && github.event_name != 'pull_request'
needs: build-pkgdown-site
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2