-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (73 loc) · 2.13 KB
/
composer-build.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
81
82
83
84
85
86
87
88
89
90
name: Pantheon Build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
PANTHEONSITEUUID: "${{ secrets.PANTHEONSITEUUID }}"
PANTHEONEMAIL: "${{ secrets.PANTHEONEMAIL }}"
MACHINETOKEN: "${{ secrets.MACHINETOKEN }}"
STAGING_PRIVATE_KEY: "${{ secrets.STAGING_PRIVATE_KEY }}"
PROJECT_ROOT: "$(pwd)"
GH_REF2: "${{ github.ref }}"
steps:
- uses: actions/checkout@v2
- name: Setup Caches
id: cache
uses: actions/cache@v1
with:
path: |
vendor
terminus
web/wp
web/wp-content
# key: ${{ runner.os }}-cache
key: cache
- name: Cache found load keys
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: |
echo 'Cache found'
ls web
echo 'root folder'
ls
export PROJECT_ROOT="$(pwd)"
. $PROJECT_ROOT/config
sh $PROJECT_ROOT/scripts/github/load-keys
# ssh-add -l
# if this is tru maybe we can use on each step
- name: Terminus Setup
id: cache-vendor
run: |
export PROJECT_ROOT="$(pwd)"
. $PROJECT_ROOT/config
sh $PROJECT_ROOT/scripts/github/load-variables
sh $PROJECT_ROOT/scripts/github/setup-terminus
printf "[\e[0;34mNOTICE\e[0m] Terminus Setup COMPLETE!!!.\n"
ls
- name: Composer build and deploy
id: cache-composer
run: |
export PROJECT_ROOT="$(pwd)"
. $PROJECT_ROOT/config
# sh $PROJECT_ROOT/scripts/github/setup-terminus
# sh $PROJECT_ROOT/scripts/github/build-wp-composer-partial
sh $PROJECT_ROOT/scripts/github/build-wp-composer
ls
# - name: Save Vender folder
# uses: actions/upload-artifact@v1
# with:
# name: vendor-data
# path: vendor
# - name: Save WP compiled
# uses: actions/upload-artifact@v1
# with:
# name: wp-compiled
# path: web
# - name: Save WP custom
# uses: actions/upload-artifact@v1
# with:
# name: wp-compiled
# path: web/wp-content/themes