Laravel CI PROD #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Laravel CI PROD | |
on: | |
workflow_run: | |
workflows: ["Release"] | |
types: | |
- completed | |
jobs: | |
deploy: | |
runs-on: [langlearn,langlearn-server] | |
steps: | |
- name: Deploy to server | |
run: | | |
echo "About to Deploy" | |
cd /var/www/delve-be/main | |
eval $(ssh-agent) | |
ssh-add ~/.ssh/delve | |
git pull origin main | |
latest_version=$(git describe --tags `git rev-list --tags --max-count=1`) | |
sed -i "s/^VERSION=.*/VERSION=$latest_version/" .env | |
composer install --no-dev | |
php artisan migrate --force | |