Skip to content

Merge pull request #10 from 3rg1s/feature/0-test #20

Merge pull request #10 from 3rg1s/feature/0-test

Merge pull request #10 from 3rg1s/feature/0-test #20

Workflow file for this run

name: Deploy to Hosting
on:
push:
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: 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.145.14.156.206 }}:/${{ secrets.TARGET_DIRECTORY }}

Check failure on line 31 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy to Hosting

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 31, Col: 14): Unexpected symbol: '145.14.156.206'. Located at position 9 within expression: secrets.145.14.156.206
- 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 }}