Updated teaching (EMSE-2024) #39
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 and Deploy to GitHub Pages | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch. Workflow can be manually triggered. | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checkout the source code (and the themes, i.e. submodules) | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
# Download the Hugo (extended) binary | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.120.3' | |
extended: true | |
# Build the static website | |
- name: Build | |
run: hugo --minify | |
# Deploy to the gh-pages branch on the same remote | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |