Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 34 additions & 25 deletions .github/workflows/basic_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Query dependencies and update old packages
run: |
Expand All @@ -28,7 +28,7 @@ jobs:

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: /usr/local/lib/R/site-library
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }}
Expand All @@ -52,12 +52,35 @@ jobs:
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")'

- name: Upload pkgdown artifact
uses: actions/upload-pages-artifact@v3
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: pkgdown-site
path: docs

deploy:
needs: r-build-and-check
if: github.event_name == 'push' && success()
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Download pkgdown artifact
uses: actions/download-artifact@v4
with:
name: pkgdown-site
path: _site

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: _site

docker-build-and-push:
#needs: r-build-and-check
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -68,7 +91,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set Environment Variables
run: |
Expand All @@ -87,16 +110,16 @@ jobs:
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3
uses: sigstore/cosign-installer@v4.1.1

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -106,32 +129,18 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.IMAGE }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ env.GIT_SHA }}

deploy:
needs: r-build-and-check
permissions:
pages: write
id-token: write
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
${{ env.IMAGE }}:${{ env.GIT_SHA }}
Loading