Skip to content

Commit

Permalink
Create php.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
emnbdx authored Aug 16, 2024
1 parent c441210 commit fc75622
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: SFTP Deploy
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
with:
# your sftp server
server: ${{ secrets.SFTP_HOST }}
# username
username: ${{ secrets.SFTP_USER }}
# SSH passsword,If a password is set, the secret key pair is ignored
password: ${{ secrets.SFTP_PASSWORD }}

0 comments on commit fc75622

Please sign in to comment.