Created
April 22, 2024 16:25
-
-
Save hasan2001jk/00d4bb57910568cfa92b8a0c78cfead6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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