Compare commits

...

2 commits

Author SHA1 Message Date
47951ec2ac Merge pull request 'added forgejo actions' (#6) from forgejo-actions into main
Some checks failed
Deploy Laravel App / deploy (push) Has been cancelled
Reviewed-on: #6
2026-05-04 05:55:48 +00:00
da7651de59 added forgejo actions 2026-05-04 00:55:03 -05:00
2 changed files with 41 additions and 2 deletions

View file

@ -0,0 +1,39 @@
name: Deploy Laravel App
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
set -e
cd ${{ vars.DEPLOY_PATH }}
git pull origin main
composer install --no-dev --optimize-autoloader
php artisan config:cache
php artisan route:cache
php artisan view:cache
chmod -R 775 storage bootstrap/cache
sudo systemctl reload php${{ vars.PHP_VERSION }}-fpm
EOF

View file

@ -1,12 +1,12 @@
services: services:
laravel.test: laravel.test:
build: build:
context: './vendor/laravel/sail/runtimes/8.5' context: './vendor/laravel/sail/runtimes/8.4'
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
WWWGROUP: '${WWWGROUP}' WWWGROUP: '${WWWGROUP}'
MYSQL_CLIENT: mariadb-client MYSQL_CLIENT: mariadb-client
image: 'sail-8.5/app' image: 'sail-8.4/app'
extra_hosts: extra_hosts:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
ports: ports: