Skip to content

test: list folders

test: list folders #24

Workflow file for this run

name: Deploy to Hosting
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4" # Set the appropriate PHP version here
- name: Install dependencies
run: composer install --no-dev --prefer-dist --optimize-autoloader
- name: List files and folders
run: ls -la
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa # optional
known_hosts: ${{ secrets.SSH_HOST }}
if_key_exists: fail # replace / ignore / fail; optional (defaults to fail)
- name: rsync over SSH
run: rsync --rsh='ssh -p${{ secrets.HOST_PORT }}' /etc/passwd ${{ secrets.HOST_USER }}@${{ secrets.HOST_IP }}:/${{ secrets.TARGET_DIRECTORY }}
- name: Deploy to Hosting
run: |
ssh -vvv -p ${{secrets.HOST_PORT}} ${{ secrets.HOST_USER }}@${{ secrets.HOST_IP }} "cd ${{ secrets.TARGET_DIRECTORY }} && git pull"
env:
HOST_USER: ${{ secrets.HOST_USER }}
HOST_IP: ${{ secrets.HOST_IP }}
HOST_PORT: ${{ secrets.HOST_PORT }}
TARGET_DIRECTORY: ${{ secrets.TARGET_DIRECTORY }}