Specifying date on c4p #51
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
# .github/workflows/gh-pages.yml | |
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-24.04 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: 'latest' | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'npm' | |
cache-dependency-path: './themes/blowfish/package-lock.json' | |
- name: Install NPM dependencies | |
run: npm --prefix ./themes/blowfish install | |
- name: Build custom Tailwind | |
run: npm run build | |
- name: Build website | |
run: hugo --minify | |
env: | |
# For maximum backward compatibility with Hugo modules | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./public |