Skip to content

Commit c318865

Browse files
committed
Added environment to actions
1 parent c3a5a49 commit c318865

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

.github/workflows/ftp-deploy.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,14 @@
1-
name: Deploy to Production
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
types: [closed]
9-
branches:
10-
- main
11-
121
jobs:
132
deploy:
143
if: github.event.pull_request.merged == true || github.event_name == 'push'
154
runs-on: ubuntu-latest
5+
environment: FTP_SERVER
166
steps:
177
- name: Checkout code
188
uses: actions/checkout@v3
199

20-
- name: Debug
21-
run: |
22-
if [ -n "${{ secrets.FTP_SERVER }}" ]; then
23-
echo "FTP_SERVER is set"
24-
else
25-
echo "FTP_SERVER is NOT set"
26-
fi
27-
28-
if [ -n "${{ secrets.FTP_USERNAME }}" ]; then
29-
echo "FTP_USERNAME is set"
30-
else
31-
echo "FTP_USERNAME is NOT set"
32-
fi
33-
34-
if [ -n "${{ secrets.FTP_PASSWORD }}" ]; then
35-
echo "FTP_PASSWORD is set"
36-
else
37-
echo "FTP_PASSWORD is NOT set"
38-
fi
39-
4010
- name: Deploy to FTP
41-
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
11+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
4212
with:
4313
server: ${{ secrets.FTP_SERVER }}
4414
username: ${{ secrets.FTP_USERNAME }}

0 commit comments

Comments
 (0)