Skip to content

switch sftp deploy task to another #6

switch sftp deploy task to another

switch sftp deploy task to another #6

Workflow file for this run

name: PHP Composer
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: Check if composer.json exists
id: check_files
uses: andstor/file-existence-action@v1
with:
files: 'composer.json'
- name: Run composer install if composer.json exists
if: steps.check_files.outputs.files_exists == 'true'
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress
- name: SFTP Deploy
uses: Dylan700/sftp-upload-action@latest
with:
server: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
uploads: |
./ => ./
ignore: |
.git*
composer.*
README.MD