setup github actions

This commit is contained in:
Yan Lin 2026-01-30 17:41:03 +01:00
parent 2228bf646c
commit 49dfe6f7db
3 changed files with 54 additions and 1 deletions

52
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Zola
run: |
ZOLA_VERSION="0.19.2"
wget -q "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
tar -xzf "zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
sudo mv zola /usr/local/bin/
- name: Build site
run: zola build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./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

View file

@ -1,4 +1,4 @@
base_url = "https://blog.yanlincs.com"
base_url = "https://zola.yanlincs.com"
title = "Yan Lin's Blog"
description = "Personal blog of Yan Lin, Postdoctoral Researcher at Aalborg University"
default_language = "en"

1
static/CNAME Normal file
View file

@ -0,0 +1 @@
zola.yanlincs.com