Target docs folder #19
Workflow file for this run
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
name: Update dev site | |
on: [push] | |
permissions: | |
contents: write | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Setup Pandoc for word conversion | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install ospsuite ecosystem and cran packages | |
run: | | |
Rscript .github/workflows/install_dependencies.R | |
- name: Build dev site | |
run: | | |
pkgdown::build_site(devel=TRUE, install=TRUE) | |
shell: Rscript {0} | |
# The project is then uploaded as an artifact named 'site'. | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: docs | |
path: docs | |
deploy: | |
concurrency: ci-${{ github.ref }} | |
# The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows. | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# The built project is downloaded into the 'site' folder. | |
- name: Download Artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: docs | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
# The deployment folder should match the name of the artifact. | |
with: | |
folder: docs | |
clean: false | |
branch: test-site | |
target-folder: docs |