Publish Website #419
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
# SPDX-FileCopyrightText: The ilo Authors | |
# SPDX-License-Identifier: 0BSD | |
name: Publish Website | |
on: | |
schedule: | |
- cron: 45 4 * * MON | |
push: | |
branches: | |
- main | |
paths: | |
- docs/** | |
jobs: | |
website: | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Clone Git Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: hugo | |
name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: latest | |
- id: previous | |
name: Get Last Release | |
run: echo "::set-output name=version::$(git describe --abbrev=0 --tags)" | |
- id: build | |
name: Build Website | |
run: hugo --minify --printI18nWarnings --printPathWarnings --printUnusedTemplates --source docs | |
env: | |
ILO_RELEASE: ${{ steps.previous.outputs.version }} | |
- id: htmltest | |
name: Run htmltest | |
uses: wjdp/htmltest-action@master | |
with: | |
config: ./docs/htmltest.yml | |
- id: deploy | |
name: Deploy Website | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/public | |
force_orphan: true | |
cname: ilo.projects.metio.wtf |