Skip to content

Build Website

Build Website #18882

Workflow file for this run

name: Build Website
on:
push:
branches:
- main # Set a branch name to trigger deployment
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
if: github.repository == 'windows-admins/winadmins-website-hugo'
steps:
- uses: actions/checkout@v3
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: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: windows-admins/winadmins-website
publish_branch: main
publish_dir: ./public
keep_files: false