Skip to content

Instantly share code, notes, and snippets.

@rueedlinger
Created September 26, 2020 12:11
Show Gist options
  • Save rueedlinger/c6aa02a41b39d6f1bc6c56bbe86ce5e1 to your computer and use it in GitHub Desktop.
Save rueedlinger/c6aa02a41b39d6f1bc6c56bbe86ce5e1 to your computer and use it in GitHub Desktop.
hugo_sftp_deploy.yml
name: Build and Publish Hugo Site (MASTER)
on:
push:
branches:
- master
jobs:
build:
name: Publish Hugo Site (MASTER)
runs-on: ubuntu-latest
steps:
- name: Checkout Source (GIT)
uses: actions/checkout@v2
- name: Hugo Build
uses: lowply/build-hugo@v0.75.1
with:
# Hugo parameters like --buildDrafts, --baseURL, etc.
# see https://gohugo.io/getting-started/usage/
args: --minify
- name: List files for debugging
# For debugging list files from current directory to console
run: ls
- name: Upload Generated Site (SFTP)
uses: SamKirkland/FTP-Deploy-Action@3.1.1
with:
# eg. replace with secret ${{ secrets.FTP_URI }}/page
ftp-server: sftp://foo.bar:22/page
ftp-username: ${{ secrets.FTP_USERNAME }}
ftp-password: ${{ secrets.FTP_PASSWORD }}
local-dir: public
# ignore self-signed certificates
git-ftp-args: --insecure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment