Skip to content

Instantly share code, notes, and snippets.

@mackenly
Last active April 15, 2023 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackenly/fbf6970ae2539bbbe0337170b51fdf12 to your computer and use it in GitHub Desktop.
Save mackenly/fbf6970ae2539bbbe0337170b51fdf12 to your computer and use it in GitHub Desktop.
SFTP Upload Action Template
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 📂 SFTP uploader
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
with:
server: 0.0.0.0
port: 22
username: username
password: ${{ secrets.FTP_PASSWORD }}
local_path: ./src/*
remote_path: /var/www/example.com/public_html
delete_remote_files: true
sftpArgs: '-o ConnectTimeout=5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment