-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 954 Bytes
/
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
name: CI
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
environment: Live
steps:
- uses: actions/checkout@v3
- name: SFTP Deploy
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
TARGET_PATH: ${{ secrets.TARGET_PATH }}
run: |
mkdir public public/img public/data
cp *.html *.css *.js public
cp roles-pantheons-spritesheet.png 4bfba3d77789a9ec16129032096c7f12.woff public
cp -r img/* public/img
cp -r data/*.json public/data
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -k -t 10 -
echo "put -r ./public/* $TARGET_PATH" | sftp -b - -P $SSH_PORT -o StrictHostKeyChecking=no $SSH_USERNAME@$SSH_HOST
ssh-add -D