All checks were successful
Build and Deploy Hugo Blog / build (push) Successful in 30s
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: Build and Deploy Hugo Blog
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
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: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build site
|
|
run: hugo --minify
|
|
|
|
- name: Deploy to Infomaniak FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
with:
|
|
server: ${{ secrets.FTP_SERVER }}
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
local-dir: ./public/
|
|
server-dir: /sites/blog.glarose.fr/
|
|
state-name: .ftp-deploy-sync-state.json
|
|
dangerous-clean-slate: true |