Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 38690ea

Browse files
committed
Add ddev deployment CI
1 parent 0859420 commit 38690ea

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.gitlab-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
variables:
22
NODE_VERSION: 16
33
PHP_VERSION: '7.3'
4+
DDEV_PROJECT_NAME: wordpress-project
45

56
# External job definitions
67
include:
@@ -16,6 +17,8 @@ include:
1617
- config/php/composer-install.yml
1718
- config/php/phpcs.yml
1819
- config/php/phpstan.yml
20+
- config/deploy/ddev/preprod.yml
21+
- config/deploy/ddev/preview.yml
1922
- config/release/gitlab.yml
2023

2124
node_eslint:

scripts/create-project.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
use function Studiometa\WPInstaller\{getSalts, randomChars, randomNumber, updateFile, readFile, runCommands};
66

7-
$name = basename( dirname( __DIR__ ) );
7+
$name = basename( dirname( __DIR__ ) );
8+
$short_name = current( explode( '.', str_replace( 'www.', '', $name ) ) );
89

910
if ( readFile( 'README.md' )[0] !== "# WordPress project\n" ) {
1011
echo "\nProject already created.";
@@ -26,6 +27,13 @@
2627
]
2728
);
2829

30+
updateFile(
31+
'.gitlab-ci.yml',
32+
array(
33+
3 => sprintf( ' DDEV_PROJECT_NAME: %s', $short_name ),
34+
)
35+
);
36+
2937
updateFile(
3038
'README.md',
3139
[

0 commit comments

Comments
 (0)