Add deploy
This commit is contained in:
parent
0ae60feab5
commit
9aae3144fe
3 changed files with 108 additions and 2 deletions
|
@ -13,7 +13,8 @@
|
||||||
"vlucas/phpdotenv": "^5.6"
|
"vlucas/phpdotenv": "^5.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "^7.1"
|
"symfony/var-dumper": "^7.1",
|
||||||
|
"deployer/deployer": "^7.5"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
56
composer.lock
generated
56
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": "1cf0b28b832329259051c7f187bc436f",
|
"content-hash": "8361a985ae54592bf8899924d98feb73",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "filp/whoops",
|
"name": "filp/whoops",
|
||||||
|
@ -589,6 +589,60 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "deployer/deployer",
|
||||||
|
"version": "v7.5.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/deployphp/deployer.git",
|
||||||
|
"reference": "1b37d639e0ffad980f6cc3873859b16de29ecad7"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/deployphp/deployer/zipball/1b37d639e0ffad980f6cc3873859b16de29ecad7",
|
||||||
|
"reference": "1b37d639e0ffad980f6cc3873859b16de29ecad7",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": "^8.0|^7.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.64",
|
||||||
|
"pestphp/pest": "^3.3",
|
||||||
|
"phpstan/phpstan": "^1.4",
|
||||||
|
"phpunit/php-code-coverage": "^11.0",
|
||||||
|
"phpunit/phpunit": "^11.4"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"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": "2024-11-08T13:18:44+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v7.1.8",
|
"version": "v7.1.8",
|
||||||
|
|
51
deploy.php
Normal file
51
deploy.php
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
namespace Deployer;
|
||||||
|
|
||||||
|
require 'recipe/common.php';
|
||||||
|
// Project name
|
||||||
|
set('application', 'Bit');
|
||||||
|
|
||||||
|
// Config
|
||||||
|
set('repository', 'git@git.maartenvr98.nl:maartenvr98/IPcalc-u-later.git');
|
||||||
|
set('git_tty', true);
|
||||||
|
|
||||||
|
set('keep_releases', 5);
|
||||||
|
|
||||||
|
set('writable_mode', 'chmod');
|
||||||
|
|
||||||
|
add('shared_files', ['.env']);
|
||||||
|
add('shared_dirs', []);
|
||||||
|
add('writable_dirs', []);
|
||||||
|
|
||||||
|
// PHP
|
||||||
|
set('bin/php', function () {
|
||||||
|
return '/usr/bin/php8.3';
|
||||||
|
});
|
||||||
|
|
||||||
|
// Hosts
|
||||||
|
host('bit.maartenvr98.nl')
|
||||||
|
->set('remote_user', 'maartenvr98-bit')
|
||||||
|
->set('deploy_path', '/home/maartenvr98-bit/htdocs/bit.maartenvr98.nl')
|
||||||
|
->set('branch', 'main');
|
||||||
|
|
||||||
|
// Tasks
|
||||||
|
task('assets:build', function () {
|
||||||
|
runLocally('yarn install && yarn build');
|
||||||
|
});
|
||||||
|
|
||||||
|
task('assets:upload', function () {
|
||||||
|
upload('public/dist', '{{release_path}}/public');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Main deploy task
|
||||||
|
desc('Deploy your project');
|
||||||
|
task('deploy', [
|
||||||
|
'deploy:prepare',
|
||||||
|
'deploy:vendors',
|
||||||
|
'assets:build',
|
||||||
|
'assets:upload',
|
||||||
|
'deploy:publish',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Hooks
|
||||||
|
after('deploy:failed', 'deploy:unlock');
|
Loading…
Add table
Add a link
Reference in a new issue