Skip to content

Commit 9d1a2c7

Browse files
committed
syncing files
1 parent b374f64 commit 9d1a2c7

1,815 files changed

Lines changed: 162356 additions & 19 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

6 KB
Binary file not shown.

.github/.DS_Store

6 KB
Binary file not shown.

.github/workflows/deploy-php.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI - PHP Tests & Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master # change to your deploy branch
7+
8+
jobs:
9+
test:
10+
name: Run PHP tests
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v4
16+
with:
17+
php-version: '8.3'
18+
extensions: mbstring, xml, curl
19+
- name: Install dependencies
20+
run: composer install --no-progress --no-suggest --prefer-dist
21+
- name: Run PHPUnit
22+
uses: php-actions/phpunit@v4
23+
with:
24+
args: --testdox
25+
26+
deploy:
27+
name: Deploy to server
28+
needs: test
29+
if: success()
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Start ssh-agent and add private key
34+
uses: webfactory/ssh-agent@v0.8.1
35+
with:
36+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
37+
- name: Create known_hosts entry
38+
run: |
39+
mkdir -p ~/.ssh
40+
ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
41+
- name: Rsync files to server
42+
run: |
43+
rsync -avz --delete --exclude='.git' --exclude='tests' -e "ssh -p ${{ secrets.SSH_PORT }}" ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_PATH }}
44+
- name: Run remote deploy commands (migrations, clear cache, etc.)
45+
run: |
46+
ssh -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} <<'SSH_CMDS'
47+
cd ${{ secrets.TARGET_PATH }}
48+
# example: for Laravel:
49+
# php artisan migrate --force
50+
# php artisan config:cache
51+
# chown -R cpaneluser:cpaneluser storage bootstrap/cache
52+
exit
53+
SSH_CMDS

.htaccess

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
RewriteEngine On
2-
3-
RewriteRule ^\.htaccess$ - [F]
4-
5-
RewriteCond %{REQUEST_URI} =""
6-
RewriteRule ^.*$ /public/index.php [NC,L]
7-
8-
RewriteCond %{REQUEST_URI} !^/public/.*$
9-
RewriteRule ^(.*)$ /public/$1
10-
11-
RewriteCond %{REQUEST_FILENAME} -f
2+
RewriteCond %{REQUEST_FILENAME} -s [OR]
3+
RewriteCond %{REQUEST_FILENAME} -l [OR]
4+
RewriteCond %{REQUEST_FILENAME} -d
125
RewriteRule ^.*$ - [NC,L]
13-
14-
RewriteRule ^public/.*$ /public/index.php [NC,L]
15-
16-
# php -- BEGIN cPanel-generated handler, do not edit
17-
# Set the “ea-php83” package as the default “PHP” programming language.
18-
<IfModule mime_module>
19-
AddHandler application/x-httpd-ea-php83___lsphp .php .php8 .phtml
20-
</IfModule>
21-
# php -- END cPanel-generated handler, do not edit
6+
RewriteRule ^.*$ index.php [NC,L]

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require-dev": {
3+
"phpunit/phpunit": "^12.4"
4+
}
5+
}

0 commit comments

Comments
 (0)