Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.