Added workflow to deploy to prod
This commit is contained in:
24
.gitea/workflows/deploy.yaml
Normal file
24
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: FTP Upload on Push
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Upload specific files via FTP
|
||||
shell: bash
|
||||
run: |
|
||||
FILES=("index.html" "screen.js")
|
||||
|
||||
for FILE in "${FILES[@]}"; do
|
||||
echo "Uploading $FILE..."
|
||||
curl --ftp-create-dirs -T "$FILE" \
|
||||
-u "${{ secrets.FTP_USERNAME }}:${{ secrets.FTP_PASSWORD }}" \
|
||||
"ftp://${{ secrets.FTP_SERVER }}/$FILE"
|
||||
done
|
||||
Reference in New Issue
Block a user