Skip to content

Merge pull request #13 from jaempawi/main #77

Merge pull request #13 from jaempawi/main

Merge pull request #13 from jaempawi/main #77

Workflow file for this run

name: Build & Deploy Hugo Site
on:
push:
branches:
- main
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Download Hugo Book theme
run: |
mkdir -p website/themes
cd website/themes
git clone https://github.com/alex-shpak/hugo-book.git
cd ../..
- name: Generate xQTL Data Catalog
run: |
python scripts/toc.py \
content/xqtl-data/{gwas,omics,qtl,study_info,reference_data}/*.md \
-o content/xqtl-data/README.md \
-t "FunGen-xQTL Data Catalog" \
-b "https://github.com/StatFunGen/xqtl-resources/tree/main/" \
-c "Lead analysts: " \
--subfolder-readme
- name: Generate and Build Hugo Site
run: |
python scripts/hugo_generator.py \
--base-url https://statfungen.github.io/xqtl-resources/ \
--no-readme \
--no-theme-download \
--build \
--minify
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./website/public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4