-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (34 loc) · 1.34 KB
/
deploy_web_usuaris_dev.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
name: deploy_web_usuaris_dev
on:
pull_request:
branches:
- main
types:
- closed
paths:
- "config/dev/web_usuaris.yml"
jobs:
deploy_web_usuaris_dev:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get versions
id: versions
run: |
sso_service_version=$(grep version: ./config/dev/service_sso.yml | awk '{print $2}')
usuaris_web_version=$(grep version: ./config/dev/web_usuaris.yml | awk '{print $2}')
echo "::set-output name=sso_service_version::$sso_service_version"
echo "::set-output name=usuaris_web_version::$usuaris_web_version"
- name: Execute SSH Command
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
echo "Deploying SSO SERVICE VERSION: ${{ steps.versions.outputs.sso_service_version }}"
echo "Deploying USUARIS WEB VERSION: ${{ steps.versions.outputs.usuaris_web_version }}"
cd ${{ secrets.SSO_PATH }}/dev
bash deploy.sh sso_front ${{ steps.versions.outputs.sso_service_version }} ${{ steps.versions.outputs.usuaris_web_version }}