Skip to content

GitHub Pages

GitHub Pages #1414

Workflow file for this run

name: GitHub Pages
on:
schedule:
- cron: '0 0 * * *' # rebuilds at Midnight everyday
push:
branches:
- main # Set a branch to deploy
pull_request:
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
NODE_ENV: production
BABEL_ENV: production
HUGO_GA_ID: G-KQGSFFY1XV
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.143.1'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install Python dependecies
run: pip install -r requirements.txt
- name: Pull COBISS and ArXiv metadata
run: python scripts/cobiss_parser.py
- name: Install NodeJS dependencies
run: npm ci
- name: Build Hugo static page
run: hugo --gc --minify --environment production --baseURL=https://sensorlab.github.io/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public