Skip to content

Commit

Permalink
change action file
Browse files Browse the repository at this point in the history
  • Loading branch information
bndgt committed Dec 4, 2024
1 parent ed11dee commit cae3c8e
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
- name: SFTP Upload
uses: Dylan700/[email protected]
with:
server: ${{secrets.server}}
username: ${{secrets.username}}
password: ${{secrets.password}}
port: ${{secrets.port}}
uploads: /public/ => /var/www/my_webapp/www/
name: Deploy via SFTP
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Deploy files via SFTP
uses: pressidium/lftp-mirror-action@v1
with:
# SFTP credentials
host: ${{ secrets.SERVER }}
port: ${{ secrets.PORT }}
user: ${{ secrets.USERNAME }}
pass: ${{ secrets.PASSWORD }}
# lftp settings
onlyNewer: true
settings: 'sftp:auto-confirm=yes'
# Mirror command options
localDir: '/public/'
remoteDir: '/var/www/my_webapp/www/'
reverse: true
ignoreFile: '.lftp_ignore'
options: '--verbose'

0 comments on commit cae3c8e

Please sign in to comment.