Skip to content

Commit

Permalink
remove github action for deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
nayodahl committed Dec 21, 2023
1 parent a2beb2f commit 49a0e08
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
concurrency: production_environment

jobs:
build:
tests:
runs-on: ubuntu-latest
services:
mysql:
Expand All @@ -27,11 +27,9 @@ jobs:
steps:

# —— Setup GitHub actions 🐙 —————————————————————————————————————————————
# https://github.com/actions/checkout (official)
- name: Checkout
uses: actions/checkout@v2

# https://github.com/shivammathur/setup-php (community)
- name: Setup PHP, extensions and composer with shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -115,26 +113,25 @@ jobs:
deploy:
name: Deploy to prod
runs-on: ubuntu-latest
needs: build
needs: tests
if: github.ref == 'refs/heads/master'
steps:
- run: echo "Build job and tests ok on master, deploying to production server..."
- run: echo "Build job was a success on master, deploying..."
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Setup PHP and Deployer
uses: shivammathur/setup-php@master
with:
php-version: "8.1"
php-version: 8.1
tools: deployer:v7.3.0

- name: Install dependencies
- name: Setup SSH connection
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.PRIVATE_KEY }}

- name: Deploy to Production
run: |
echo '${{ secrets.KNOWN_HOSTS }}' >> ~/.ssh/known_hosts
cd app
composer install
- name: Deploy
uses: deployphp/action@v1
with:
dep: deploy
private-key: ${{ secrets.PRIVATE_KEY }}
deployer-binary: "bin/dep"
verbosity: -vvv
deployer deploy -v

0 comments on commit 49a0e08

Please sign in to comment.