-
Notifications
You must be signed in to change notification settings - Fork 79
27 lines (27 loc) · 1.07 KB
/
github-actions-demo.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
name: GitHub Actions Master
on:
push:
branches:
- master
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Stats
run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- uses: actions/checkout@v2
- run: git checkout master
- run: sudo apt-get update && sudo apt-get install -y openssh-client
- run: chmod +x ./deploy.sh
- name: Deploy on test environment
run: cat ./deploy.sh | ssh [email protected]
- run: echo "Deploying to test environment"