Skip to content

update language & workflow #32

update language & workflow

update language & workflow #32

Workflow file for this run

name: Deploy public
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
hugoVersion:
description: 'Hugo version to use'
required: false
default: '0.128.0'
type: string
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: ${{ inputs.hugoVersion || '0.128.0' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb
sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build
run: hugo --minify --gc
- name: Deploy to public branch
run: |
cd public
git init
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add -A
git commit -m "Build: (${{ github.sha }}) ${{ github.event.head_commit.message }}"
git push --force https://${{ github.token }}@github.com/${{ github.repository }}.git HEAD:public