-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.37 KB
/
deploy_to_test.yml
File metadata and controls
44 lines (44 loc) · 1.37 KB
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
name: Deploy to TEST
on:
workflow_dispatch:
inputs:
deployment_type:
description: 'Type of deployment'
required: true
default: 'normal'
type: choice
options:
- normal
- hotfix
jobs:
deploy_to_test:
runs-on: ubuntu-latest
container:
image: ghcr.io/uceap/devcontainer-drupal:main
env:
TERMINUS_SITE: ${{ vars.TERMINUS_SITE }}
steps:
- name: Load secrets
uses: 1password/load-secrets-action@v2
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
TERMINUS_TOKEN: op://secrets-example/pantheon-terminus/credential
SSH_PRIVATE_KEY: op://secrets-example/pantheon-ssh/private key
- name: Sync content and deploy to TEST
if: ${{ github.event.inputs.deployment_type == 'normal' }}
run: |
echo "$SSH_PRIVATE_KEY" > ../private.key
chmod 600 ../private.key
eval `ssh-agent -s`
ssh-add ../private.key
uceap deploy-to-test
- name: Deploy to TEST without sync
if: ${{ github.event.inputs.deployment_type == 'hotfix'}}
run: |
echo "$SSH_PRIVATE_KEY" > ../private.key
chmod 600 ../private.key
eval `ssh-agent -s`
ssh-add ../private.key
uceap deploy-to-test --no-sync