Merge branch 'hotfix/deployer-config' into develop
This commit is contained in:
@@ -0,0 +1,49 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build assets and deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: 7.3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --prefer-dist --no-progress
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Build assets
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: musps/action-deployer-php@master
|
||||||
|
with:
|
||||||
|
args: deploy production
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
+2
-1
@@ -82,7 +82,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"deployer/deployer": "^6.0",
|
"deployer/deployer": "^6.8",
|
||||||
|
"deployer/recipes": "^6.2",
|
||||||
"ichhabrecht/filefill": "^2.0"
|
"ichhabrecht/filefill": "^2.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|||||||
Generated
+59
-1
@@ -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": "55d1141b531b735fa5335acff314629f",
|
"content-hash": "bdb0e8fc25a5e98d75bea5bce07ec0bd",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "christophlehmann/imageoptimizer",
|
"name": "christophlehmann/imageoptimizer",
|
||||||
@@ -6515,6 +6515,64 @@
|
|||||||
"abandoned": true,
|
"abandoned": true,
|
||||||
"time": "2019-12-12T13:45:57+00:00"
|
"time": "2019-12-12T13:45:57+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "deployer/recipes",
|
||||||
|
"version": "6.2.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/deployphp/recipes.git",
|
||||||
|
"reference": "84b3229c518c094a950e1fe785b7b8f9598770fe"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/deployphp/recipes/zipball/84b3229c518c094a950e1fe785b7b8f9598770fe",
|
||||||
|
"reference": "84b3229c518c094a950e1fe785b7b8f9598770fe",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "~7.0"
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"deployer/recipes": "self.version"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"deployer/deployer": "^6.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"autoload.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Anton Medvedev",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "3rd party deployer recipes",
|
||||||
|
"homepage": "https://github.com/deployphp/recipes",
|
||||||
|
"keywords": [
|
||||||
|
"cachetool",
|
||||||
|
"cloudflare",
|
||||||
|
"deploy",
|
||||||
|
"deployer",
|
||||||
|
"deployment",
|
||||||
|
"hipchat",
|
||||||
|
"newrelic",
|
||||||
|
"rabbit",
|
||||||
|
"recipes",
|
||||||
|
"sentry",
|
||||||
|
"slack",
|
||||||
|
"yarn"
|
||||||
|
],
|
||||||
|
"abandoned": true,
|
||||||
|
"time": "2019-06-27T06:47:18+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ichhabrecht/filefill",
|
"name": "ichhabrecht/filefill",
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
|
|||||||
+63
-41
@@ -1,15 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Deployer;
|
namespace Deployer;
|
||||||
|
|
||||||
require 'recipe/typo3.php';
|
require 'vendor/deployer/deployer/recipe/typo3.php';
|
||||||
|
require 'vendor/deployer/recipes/recipe/rsync.php';
|
||||||
|
require 'vendor/deployer/recipes/recipe/cachetool.php';
|
||||||
|
|
||||||
set('typo3_webroot', 'public');
|
set('typo3_webroot', 'public');
|
||||||
set('application', 'ep-reisen-typo3');
|
set('application', 'ep-reisen-typo3');
|
||||||
set('repository', '[email protected]:dreipunktnull/ep-reisen-web');
|
set('repository', '[email protected]:dreipunktnull/ep-reisen-web');
|
||||||
|
|
||||||
set('git_tty', true);
|
set('git_tty', false);
|
||||||
set('ssh_type', 'native');
|
set('ssh_type', 'native');
|
||||||
set('ssh_multiplexing', true);
|
|
||||||
|
|
||||||
set('allow_anonymous_stats', false);
|
set('allow_anonymous_stats', false);
|
||||||
|
|
||||||
@@ -22,57 +23,78 @@ add('shared_dirs', [
|
|||||||
'config/sites',
|
'config/sites',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
host('production')
|
host('185.237.67.190')
|
||||||
->hostname('185.237.67.190')
|
->stage('production')
|
||||||
->user('p546128')
|
->user('p546128')
|
||||||
->forwardAgent()
|
->forwardAgent()
|
||||||
->multiplexing()
|
->multiplexing()
|
||||||
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
->set('deploy_path', '/home/www/p546128/html/{{application}}')
|
||||||
->set('bin/php', '/usr/local/bin/php')
|
->set('bin/php', '/usr/local/bin/php')
|
||||||
->set('http_user', 'p546128')
|
->set('http_user', 'p546128')
|
||||||
->set('writable_mode', 'chmod')
|
|
||||||
->set('bin/composer', '/usr/local/bin/composer')
|
->set('bin/composer', '/usr/local/bin/composer')
|
||||||
|
->set('rsync_src', __DIR__)
|
||||||
|
->set('rsync', [
|
||||||
|
'exclude' => [
|
||||||
|
'.ddev',
|
||||||
|
'.DS_Store',
|
||||||
|
'.git',
|
||||||
|
'.github',
|
||||||
|
'.idea',
|
||||||
|
'node_modules',
|
||||||
|
'public/fileadmin',
|
||||||
|
'public/typo3temp',
|
||||||
|
'public/uploads',
|
||||||
|
'var',
|
||||||
|
'.editorconfig',
|
||||||
|
'.gitignore',
|
||||||
|
'.htaccess_prod',
|
||||||
|
'deploy.php',
|
||||||
|
'package.json',
|
||||||
|
'package-lock.json',
|
||||||
|
'postcss.config.js',
|
||||||
|
'tailwind.config.js',
|
||||||
|
'webpack.config.js',
|
||||||
|
],
|
||||||
|
'exclude-file' => false,
|
||||||
|
'include' => [],
|
||||||
|
'include-file' => false,
|
||||||
|
'filter' => [],
|
||||||
|
'filter-file' => false,
|
||||||
|
'filter-perdir' => false,
|
||||||
|
'flags' => 'rz',
|
||||||
|
'options' => ['delete', 'links'],
|
||||||
|
'timeout' => 300,
|
||||||
|
])
|
||||||
|
->set('cachetool_args', '--web --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de')
|
||||||
;
|
;
|
||||||
|
|
||||||
task('build', function () {
|
task('deploy', [
|
||||||
runLocally('npm i && npm run build');
|
'deploy:info',
|
||||||
});
|
'deploy:prepare',
|
||||||
|
'deploy:lock',
|
||||||
task('upload:epevents', function () {
|
'deploy:release',
|
||||||
upload(
|
'rsync',
|
||||||
__DIR__ . '/public/typo3conf/ext/ep_events/Resources/Public/',
|
'deploy:clear_paths',
|
||||||
'{{release_path}}/public/typo3conf/ext/ep_events/Resources/Public'
|
'deploy:shared',
|
||||||
);
|
'typo3:database:migrate',
|
||||||
});
|
'typo3:language:update',
|
||||||
|
'typo3:cache:flush',
|
||||||
task('upload:eptheme', function () {
|
'deploy:symlink',
|
||||||
upload(
|
'deploy:unlock',
|
||||||
__DIR__ . '/public/typo3conf/ext/ep_theme/Resources/Public/',
|
'cachetool:clear:opcache',
|
||||||
'{{release_path}}/public/typo3conf/ext/ep_theme/Resources/Public'
|
'cleanup',
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
task('assets', [
|
|
||||||
'build',
|
|
||||||
'upload:epevents',
|
|
||||||
'upload:eptheme',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
task('caches:flush', function () {
|
task('typo3:database:migrate', function () {
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
|
|
||||||
});
|
|
||||||
|
|
||||||
task('languages:update', function () {
|
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
|
|
||||||
});
|
|
||||||
|
|
||||||
task('database:update', function () {
|
|
||||||
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms database:updateschema');
|
||||||
});
|
});
|
||||||
|
|
||||||
before('deploy:symlink', 'assets');
|
task('typo3:language:update', function () {
|
||||||
before('deploy:symlink', 'database:update');
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms language:update');
|
||||||
before('deploy:symlink', 'languages:update');
|
});
|
||||||
before('cleanup', 'caches:flush');
|
|
||||||
|
task('typo3:cache:flush', function () {
|
||||||
|
run('{{bin/php}} {{release_path}}/vendor/bin/typo3cms cache:flush');
|
||||||
|
});
|
||||||
|
|
||||||
after('deploy:failed', 'deploy:unlock');
|
after('deploy:failed', 'deploy:unlock');
|
||||||
|
|||||||
Reference in New Issue
Block a user