info: add seminar #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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 Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
#extended: true | |
- name: Clone the theme and static files | |
run: | | |
git clone --depth=1 --single-branch \ | |
https://github.com/AFlyingSheep/hugo-theme-topdown.git themes/topdown | |
git clone --depth=1 --single-branch \ | |
https://github.com/ACSAlab/acsa-web-data.git static | |
- name: Build to GitHub Pages | |
run: hugo --buildFuture --baseURL=https://acsalab.github.io/acsa-web-2024/ -t topdown -d ./public | |
- name: Build to acsalab | |
run: hugo --buildFuture --baseURL=https://acsa.ustc.edu.cn/ -t topdown -D -d ./public2 | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public2 | |
- name: Deploy local branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
publish_branch: gh-pages-hugo |