Skip to content

update

update #60

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
- dev
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: |
if [ "${{ github.ref_name }}" = "main" ]; then
hugo --minify --baseURL "https://binary.builders/"
else
hugo --minify --baseURL "https://binary.builders" --pathPrefix "v2"
fi
env:
HUGO_ENV: production
HUGO_PARAMS_CMS_BRANCH: ${{ github.ref_name }}
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: public
target-folder: "${{ github.ref_name == 'main' && '' || 'v2' }}"
clean: true