Skip to content

Instantly share code, notes, and snippets.

@hasan2001jk
Created April 22, 2024 16:25
Show Gist options
  • Save hasan2001jk/00d4bb57910568cfa92b8a0c78cfead6 to your computer and use it in GitHub Desktop.
Save hasan2001jk/00d4bb57910568cfa92b8a0c78cfead6 to your computer and use it in GitHub Desktop.
name: FTP Deploy
on:
push:
branches:
- main
jobs:
build:
name: Deploy to FTP
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: FTP Deploy
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
- name: Update VERSION.txt
run: |
echo "Branch: $(git branch --show-current)" >> VERSION.txt
echo "Commit: $(git log -1 --pretty=format:"%h - %an, %ar : %s")" >> VERSION.txt
- name: FTP Upload VERSION.txt
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./
remote-dir: /
filter: VERSION.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment