Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |