Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Publish Website
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
SFTP-Deploy-Action:
name: SFTP-Deploy-Action
runs-on: ubuntu-latest
steps:
- 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.FTP_HOST }}
remote-user: ${{ secrets.FTP_USER }}
remote-password: ${{ secrets.FTP_PASSWORD }}
# Path for specific folder on server for files deployment
remote-path: /sub/deploy-test
# Port for SFTP access to server
remote-port: 221