Skip to content

Commit

Permalink
Merge pull request #267 from NBISweden/devel
Browse files Browse the repository at this point in the history
Merge GitHub Pages changes to `main`
  • Loading branch information
fasterius authored Oct 24, 2024
2 parents d066a7d + 4bf902e commit 7a57973
Show file tree
Hide file tree
Showing 175 changed files with 19,534 additions and 38,280 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-and-deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and deploy site

on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- "README.md"
- "LICENCE.md"
- "env/"
- "pages/tools-for-reproducible-research.md"
- "tutorials/"

concurrency:
group: pages
cancel-in-progress: true

jobs:

build:
runs-on: ubuntu-latest
container: ghcr.io/nbisweden/workshop-reproducible-research/build-website:specky
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Build website with Quarto
uses: quarto-dev/quarto-actions/render@v2

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/'

deploy:
runs-on: ubuntu-latest
needs: build
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@v4
78 changes: 78 additions & 0 deletions .github/workflows/build-and-publish-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and publish Docker images

on:
push:
branches:
- main
paths:
- "env/*/Dockerfile"
- "env/*/environment.yml"

env:
REGISTRY: ghcr.io
INCLUDE_DIR: "env/"
REPOSITORY: ${{ github.repository }}

jobs:
changed-directories:
name: Get last directory name of changed files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
uses: tj-actions/changed-files@v45
id: changed-files
with:
matrix: true
dir_names: true
path: ${{ env.INCLUDE_DIR }}
dir_names_include_files: ${{ env.INCLUDE_DIR }}
dir_names_exclude_current_dir: true

build-and-push-image:
name: Build and push Docker images
runs-on: ubuntu-latest
needs: changed-directories
strategy:
fail-fast: false
matrix:
name: ${{ fromJSON(needs.changed-directories.outputs.matrix) }}
platform: [linux/amd64]
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ matrix.name }}
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
flavor: |
latest=false
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ env.INCLUDE_DIR }}/${{ matrix.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
platforms: ${{ matrix.platform }}
31 changes: 0 additions & 31 deletions .github/workflows/canvas-upload.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/docker-slim.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
name: setup
name: Test Conda environments

on:
workflow_dispatch:
branches:
- main
- devel
pull_request:
branches:
- main
paths:
- 'tutorials/snakemake/snakefile_mrsa.smk'
- 'tutorials/snakemake/environment.yml'
- 'tutorials/nextflow/environment.yml'
- 'tutorials/nextflow/main_mrsa.yml'
- 'tutorials/nextflow/samplesheet.csv'
- 'tutorials/jupyter/environment.yml'
- 'tutorials/jupyter/references.bib'
- 'tutorials/jupyter/supplementary_material.ipynb'
- 'tutorials/quarto/environment.yml'
- 'tutorials/quarto/quarto-tutorial-example.qmd'

concurrency:
group: conda-env-test
cancel-in-progress: true

jobs:
install:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest ]
os: [macos-latest, ubuntu-latest]
env: [snakemake, nextflow, jupyter, quarto]
include:
- env: snakemake
Expand All @@ -24,18 +39,25 @@ jobs:
- env: jupyter
cmd: jupyter nbconvert --to HTML tutorials/jupyter/supplementary_material.ipynb
- env: quarto
cmd: mamba install -c conda-forge quarto && mamba install -c conda-forge deno && export QUARTO_DENO=$(which deno) && quarto render tutorials/quarto/quarto-tutorial-example.qmd --to html
cmd: conda install -c conda-forge quarto && conda install -c conda-forge deno && export QUARTO_DENO=$(which deno) && quarto render tutorials/quarto/quarto-tutorial-example.qmd --to html
exclude:
- os: macos-latest
env: snakemake
- os: macos-latest
env: nextflow
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2.2.0
- name: Checkout
uses: actions/checkout@v4

- name: Conda setup
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: ${{ matrix.env }}-env
environment-file: tutorials/${{ matrix.env }}/environment.yml
use-mamba: true
channel-priority: strict
- name: Test ${{ matrix.env }}

- name: Test ${{ matrix.env }} environment
shell: bash -l {0}
run: |
conda list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: docker
name: Test MRSA image

on:
workflow_dispatch:
branches:
- main
- devel
pull_request:
branches:
- main
paths:
- 'tutorials/containers/Dockerfile'
- 'tutorials/containers/environment.yml'
- 'tutorials/containers/Snakefile'
- 'tutorials/containers/config.yml'
- 'tutorials/containers/code/*'
branches:
- main

jobs:
docker-build-and-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker build
- name: Checkout
uses: actions/checkout@v4

- name: Build and test Docker image
run: |
docker build -t my_docker_project -f tutorials/containers/Dockerfile tutorials/containers/
docker run --rm my_docker_project
docker run --rm my_docker_project
28 changes: 28 additions & 0 deletions .github/workflows/upload-to-canvas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Upload landing page to Canvas

on:
workflow_dispatch:
branches:
- main
push:
branches:
- main
paths:
- 'pages/tools-for-reproducible-research.md'
- 'pages/upload-page-to-canvas.sh'

jobs:
upload:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Upload to Canvas
env:
API_TOKEN: ${{ secrets.CANVAS_API_TOKEN }}
run: |
bash pages/upload-page-to-canvas.sh pages/tools-for-reproducible-research.md $API_TOKEN
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ snakemake/*tsv
# Quarto-related files
.quarto/
**/*_files
_freeze/
docs/

# VScode
.vscode

/.quarto/
21 changes: 21 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
pagetitle: "404: Page not found"
date: ""
toc: false
sidebar: false
number-sections: false
format: html
execute:
freeze: false
---

::: {style="text-align: center;"}

[404]{.fourofour}

# 404: Page not found

It seems like you have stumbled upon a page that doesn't exist.
Please check your URL again.

:::
Loading

0 comments on commit 7a57973

Please sign in to comment.