generated from osamhack2021/Repo_Sample-Technology_ProjectName_TeamName
-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (27 loc) · 1.08 KB
/
main.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
# Workflow to pull latest commits from develop branch and serve with Docker containers via SSH
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the develop branch
push:
branches: [develop]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Build & Deploy
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Executing remote ssh commands
# Uses ssh-action. Check https://github.com/marketplace/actions/ssh-remote-commands for more
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script_stop: true # Stop script after first failure
script: cd ~/workspace/handover && /bin/sh ./scripts/deploy.sh