48 lines
1 KiB
YAML
48 lines
1 KiB
YAML
name: Build Hugo Site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.20.5'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install PostCSS
|
|
run: |
|
|
npm install -g postcss postcss-cli
|
|
npm install autoprefixer
|
|
|
|
- name: Set up Hugo Extended
|
|
uses: peaceiris/actions-hugo@v2
|
|
with:
|
|
hugo-version: '0.121.2'
|
|
extended: true # Specify to use Hugo Extended version
|
|
|
|
- name: Build Hugo site
|
|
run: hugo --minify
|
|
|
|
- name: test deployment via FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@4.0.0
|
|
with:
|
|
server: ${{ secrets.FTP_SERVER }}
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
server-dir: '/'
|