Try with new version? #233
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: Render and deploy Quarto files | |
on: | |
push: | |
pull_request: | |
jobs: | |
quarto-render-and-deploy: | |
runs-on: ubuntu-latest | |
container: rocker/verse:latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GITHUB_PAT: ${{ secrets.GH_PAT }} | |
WORKON_HOME: "~/.virtualenvs" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Change ownership of /github/home | |
run: sudo chown -R $(whoami) /github/home | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install -y libudunits2-dev libgdal-dev | |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) | |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | |
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
&& sudo apt update \ | |
&& sudo apt install gh -y | |
shell: /bin/bash {0} | |
- name: Setup Python and virtual environment using requirements file | |
id: setup-python-venv | |
uses: srvanderplas/[email protected] | |
with: | |
python-version-file: '.python-version' | |
cache-dependency-path: requirements.txt | |
install-cmd: "./py-deps -i" | |
workon-home: "$WORKON_HOME" | |
- name: Test | |
run: | | |
echo $RETICULATE_PYTHON; | |
echo $RETICULATE_PYTHON_ENV; | |
echo "$pythonLocation" >> $GITHUB_PATH; | |
- name: Renv setup | |
uses: r-lib/actions/setup-renv@v2 | |
- name: Renv and R install status | |
shell: Rscript {0} | |
run: | | |
renv::status() | |
renv::diagnostics() | |
- name: Reticulate checks | |
shell: Rscript {0} | |
run: | | |
system("source venv/bin/activate") | |
devtools::session_info() | |
reticulate::py_config() | |
reticulate::use_virtualenv("${{ env.VIRTUAL_ENV }}") | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.5.57 | |
tinytex: true | |
- name: Render Quarto Project | |
shell: /bin/bash {0} | |
run: | | |
quarto render --execute-debug | |
- name: "Deploy to gh-pages" | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |