Compare commits
No commits in common. "f9167a6bdcff9b706acd057c066522e211556b7b" and "25323b4cef110df1dd997bcc1c726ce66017cac2" have entirely different histories.
f9167a6bdc
...
25323b4cef
32
.github/workflows/deploy.yml
vendored
32
.github/workflows/deploy.yml
vendored
@ -1,32 +0,0 @@
|
|||||||
name: deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [released]
|
|
||||||
|
|
||||||
concurrency: production_environment
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
production:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: Production
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
tools: composer
|
|
||||||
extensions: bcmath, ctype, fileinfo, json, odbc, mbstring, openssl, pdo, pdo_mysql, pdo_odbc tokenizer, xml, soap, redis, igbinary
|
|
||||||
php-version: "8.2"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: composer install --no-interaction --no-scripts --prefer-dist
|
|
||||||
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
uses: deployphp/action@v1
|
|
||||||
with:
|
|
||||||
private-key: ${{ secrets.DEPLOY_KEY }}
|
|
||||||
dep: deploy production
|
|
||||||
@ -15,7 +15,6 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-ide-helper": "^2.13",
|
"barryvdh/laravel-ide-helper": "^2.13",
|
||||||
"deployer/deployer": "^7.3",
|
|
||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"laravel/breeze": "^1.24",
|
"laravel/breeze": "^1.24",
|
||||||
"laravel/pint": "^1.0",
|
"laravel/pint": "^1.0",
|
||||||
|
|||||||
47
composer.lock
generated
47
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "6f613b80fde0f91b5425be61accfc51f",
|
"content-hash": "feae295eec753591e7cf70bf21f57924",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@ -6158,49 +6158,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-11-17T09:50:14+00:00"
|
"time": "2022-11-17T09:50:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "deployer/deployer",
|
|
||||||
"version": "v7.3.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/deployphp/deployer.git",
|
|
||||||
"reference": "c5c5e79d4e57445918ed24a9cdd3d85b0f261de3"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/deployphp/deployer/zipball/c5c5e79d4e57445918ed24a9cdd3d85b0f261de3",
|
|
||||||
"reference": "c5c5e79d4e57445918ed24a9cdd3d85b0f261de3",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"bin": [
|
|
||||||
"dep"
|
|
||||||
],
|
|
||||||
"type": "library",
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Anton Medvedev",
|
|
||||||
"email": "anton@medv.io"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Deployment Tool",
|
|
||||||
"homepage": "https://deployer.org",
|
|
||||||
"support": {
|
|
||||||
"docs": "https://deployer.org/docs",
|
|
||||||
"issues": "https://github.com/deployphp/deployer/issues",
|
|
||||||
"source": "https://github.com/deployphp/deployer"
|
|
||||||
},
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"url": "https://github.com/sponsors/antonmedv",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2023-04-05T09:24:30+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
@ -9801,5 +9758,5 @@
|
|||||||
"php": "^8.1"
|
"php": "^8.1"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
|||||||
48
deploy.php
48
deploy.php
@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Deployer;
|
|
||||||
|
|
||||||
require 'recipe/laravel.php';
|
|
||||||
require 'contrib/npm.php';
|
|
||||||
|
|
||||||
// Config
|
|
||||||
|
|
||||||
set('git_ssh_command', 'ssh');
|
|
||||||
set('repository', 'ssh://git@ssh.git.lovelynet.net:9001/PriceyBot/PriceyBotPanel.git');
|
|
||||||
|
|
||||||
add('shared_files', []);
|
|
||||||
add('shared_dirs', []);
|
|
||||||
add('writable_dirs', []);
|
|
||||||
|
|
||||||
set('http_user', 'nginx');
|
|
||||||
set('http_group', 'nginx');
|
|
||||||
set('writable_mode', 'chmod');
|
|
||||||
|
|
||||||
// Hosts
|
|
||||||
host('production')
|
|
||||||
->set('hostname', 'vps.benjamyn.love')
|
|
||||||
->set('port', '22')
|
|
||||||
->set('remote_user', 'root')
|
|
||||||
->set('deploy_path', '/opt/PriceyBotPanel');
|
|
||||||
|
|
||||||
|
|
||||||
// Tasks
|
|
||||||
task('npm:build', function () {
|
|
||||||
$command = match (get('alias')) {
|
|
||||||
'production' => 'production',
|
|
||||||
'staging' => 'development',
|
|
||||||
default => 'production'
|
|
||||||
};
|
|
||||||
run("cd {{release_path}} && {{bin/npm}} run {$command}");
|
|
||||||
});
|
|
||||||
|
|
||||||
task('perm:fix', function () {
|
|
||||||
run("chown -R nginx:nginx /opt/PriceyBotPanel");
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Hooks
|
|
||||||
after('deploy:vendors', 'npm:install');
|
|
||||||
after('npm:install', 'npm:build');
|
|
||||||
after('npm:build', 'perm:fix');
|
|
||||||
after('deploy:failed', 'deploy:unlock');
|
|
||||||
Reference in New Issue
Block a user