Skip to content

Merge pull request #3 from NBISweden/H25 #8

Merge pull request #3 from NBISweden/H25

Merge pull request #3 from NBISweden/H25 #8

Workflow file for this run

name: build
on:
pull_request:
branches:
- main
workflow_dispatch:
push:
branches:
- 'main'
- 'test-build'
jobs:
build:
name: Build site
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
steps:
- name: Cancel Previous Runs
if: ${{ !env.ACT }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: "1.3.1-0"
environment-file: environment.yml
environment-name: pgip2024
init-shell: bash
cache-environment: true
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.5.57
- run: |
quarto --version
- name: Add miniconda path
run: |
echo "$(dirname $(which R))" >> $GITHUB_PATH
quarto check
- name: Render project without publishing
uses: quarto-dev/quarto-actions/render@v2
if: ${{ github.event_name == 'pull_request' }}
with:
path: .
- name: Publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
if: ${{ github.ref_name == 'main' || github.ref_name == 'test-build' }}
with:
target: gh-pages
path: .
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}