-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.56 KB
/
deploy-main-branches.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
name: Deploy Main Branch Artifact
on:
push:
branches:
- '2.x'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy Main Artifact
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:php8.3
steps:
- uses: actions/checkout@v4
- name: Restore Cache
uses: actions/cache@v4
with:
path: |
vendor
docroot/core
docroot/libraries
docroot/modules/contrib
key: 2.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
restore-keys: |
2.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
2.x-${{ hashFiles('blt/blt.yml') }}-${{ hashFiles('composer.json') }}-
2.x-${{ hashFiles('blt/blt.yml') }}-
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- name: Deploy Artifact
run: |
git config --system --add safe.directory '*' &&
git config --global user.email "[email protected]" &&
git config --global user.name "Github Actions" &&
ssh-keyscan -t rsa svn-45197.prod.hosting.acquia.com >> /root/.ssh/known_hosts &&
composer install -n &&
git checkout composer.lock &&
blt deploy -v -n