-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (44 loc) · 1.66 KB
/
deploy.yml
File metadata and controls
57 lines (44 loc) · 1.66 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This is a basic workflow to upload files
# from GitHub to server via GitHub Actions
name: push on prod
# Controls when the workflow will run
on:
# Triggers the workflow on push request event
# but only for the specific branch
push:
branches: [ main ]
# A workflow run is made up of one or more jobs
# that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "SFTP-Deploy-Action"
SFTP-Deploy-Action:
name: SFTP-Deploy-Action
# The type of runner that the job will run on
# (depends on server but usually this value is works)
runs-on: ubuntu-latest
# Steps represent a sequence of tasks
# that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE,
# so your job can access it
- name: Checkout
uses: actions/checkout@v3
with:
# Fetch all history for all tags and branches
fetch-depth: 0
# Checkout a specific branch
ref: main
# This is a composite GitHub Action (Linux runner)
# for deploying repository content to remote server
- name: SFTP-Deploy-Action
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: sftp
# Credentials for SFTP access to server using GitHub secrets
remote-host: ${{ secrets.SFTP_HOST }}
remote-user: ${{ secrets.SFTP_USERNAME }}
remote-password: ${{ secrets.SFTP_PASSWORD }}
# Path for specific folder on server for files deployment
remote-path: /plugins/ItemsAdder/contents
# Port for SFTP access to server
remote-port: 2023