-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (70 loc) · 2.08 KB
/
build-test.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Transfer Build Files
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Update Git code on the serverssss
run: |
ssh ${{ secrets.REMOTE_USERNAME }}@${{ secrets.REMOTE_HOST }} "ls"
- name: executing remote ssh commands using passwords
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script:
sudo apt update
# - name: Transfer Build Files to Ubuntu Instance
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# username: ${{ secrets.REMOTE_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: "build"
# target: "/tmp"
# - name: Check ls j
# run: ls
# - name: Check file existence
# id: check_files
# uses: andstor/file-existence-action@v1
# with:
# files: "build"
# allow_failure: true
# - name: Archive Build Files
# uses: actions/upload-artifact@v2
# with:
# name: build
# path: ./build
# transfer-files:
# runs-on: ubuntu-latest
# needs: build
# defaults:
# run:
# working-directory: ./all_in_docker/client
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# - name: Download Build Files
# uses: actions/download-artifact@v2
# with:
# name: build
# path: ./
# - name: Transfer Build Files to Ubuntu Instance
# uses: appleboy/scp-action@master
# with:
# host: ${{ secrets.REMOTE_HOST }}
# username: ${{ secrets.REMOTE_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# source: "build/*"
# target: "/path/on/remote/server/"