-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.example.yml
81 lines (74 loc) · 1.76 KB
/
.gitlab-ci.example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
stages:
- deploy
deploy_dev:
environment: development
stage: deploy
tags:
- afs-dev
only:
- dev
script:
- cd /var/www/html/wp.site.com/
- git rm --cached --sparse wp-config.php || true
- git fetch --all
- git reset --hard origin/dev
- echo "Deployment script executed. Database import can be triggered manually."
manual_import_db_dev:
stage: deploy
tags:
- afs-dev
only:
- dev
script:
- cd /var/www/html/wp.site.com/
- wp db import /var/www/html/wp.site.com/db/db.sql
- wp search-replace 'wp.ddev.site' 'wp.site.com'
when: manual
deploy_stage:
environment: development
stage: deploy
tags:
- afs-dev
only:
- stage
script:
- cd /var/www/html/wp.stage.com/
- git rm --cached --sparse wp-config.php || true
- git fetch --all
- git reset --hard origin/stage
- echo "Deployment script executed. Database import can be triggered manually."
manual_import_db_stage:
stage: deploy
tags:
- afs-dev
only:
- stage
script:
- cd /var/www/html/wp.stage.com/
- wp db import /var/www/html/wp.stage.com/db/db.sql
- wp search-replace 'wp.ddev.site' 'wp.stage.com'
when: manual
deploy_prelive:
environment: development
stage: deploy
tags:
- afs-dev
only:
- main
script:
- cd /var/www/html/wp.prelive.com/
- git rm --cached --sparse wp-config.php || true
- git fetch --all
- git reset --hard origin/main
- echo "Deployment script executed. Database import can be triggered manually."
manual_import_db_prelive:
stage: deploy
tags:
- afs-dev
only:
- main
script:
- cd /var/www/html/wp.prelive.com/
- wp db import /var/www/html/wp.prelive.com/db/db.sql
- wp search-replace 'wp.ddev.site' 'wp.prelive.com'
when: manual