-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (39 loc) · 997 Bytes
/
main.yml
File metadata and controls
40 lines (39 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deploy to SFTP
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: sftp-deploy
url: https://github.com
strategy:
matrix:
go-version: ['1.21.x']
defaults:
run:
working-directory: ./app
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build Go application
run: go build -o CHANGE_ME main.go
- name: Checkout
uses: actions/checkout@v3
- name: Deploy to SFTP
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
with:
username: ${{ secrets.FTP_USERNAME }}
server: ${{ secrets.FTP_SERVER }}
port: ${{ secrets.FTP_PORT }}
local_path: './app/*'
remote_path: '.'
sftp_only: true
password: ${{ secrets.FTP_PASSWORD }}