Skip to content

Instantly share code, notes, and snippets.

@mennwebs
Created January 10, 2024 01:53
Show Gist options
  • Save mennwebs/f0ee65b33ff44417536b9e83bd9d74b5 to your computer and use it in GitHub Desktop.
Save mennwebs/f0ee65b33ff44417536b9e83bd9d74b5 to your computer and use it in GitHub Desktop.
GitHub Action: Push to Deploy sFTP
on: [push]
jobs:
deploy_job:
runs-on: ubuntu-latest
name: deploy
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Build
run: npm run prod
- name: Deploy
uses: wlixcc/[email protected]
with:
username: 'xxxx'
server: 'xx.xx.xx.xx'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
local_path: './theme/*'
remote_path: '/home/xxx/webapps/xxx/wp-content/themes/xxx/theme'
sftpArgs: '-o ConnectTimeout=5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment