-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (36 loc) · 1.05 KB
/
publish.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
# git tag reminder :
# version tag look like : v1.0.0-rc0
# add a tag locally : git tag tagName
# push it : git push origin tagName
# remove a tag locally : git tag -d tagName
# remove it on remote : git push --delete origin tagName
name: Deploy
on:
push:
tags:
- v*
jobs:
deploy_job:
name: Deploy Job
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: build
run: |
mkdir .public
mv * .public/
mv .public public
rm public/LICENSE.txt public/README.md
- name: SSH setup
env:
DEPLOY_KEY: ${{ secrets.deploy_key }}
#KNOWN_HOSTS: ${{ secrets.known_hosts }}
run: |
mkdir -p ~/.ssh
echo "${DEPLOY_KEY}" > ~/.ssh/my_rsync_key
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
echo "IdentityFile ~/.ssh/my_rsync_key" >> ~/.ssh/config
chmod -R 700 ~/.ssh
- name: Rsync deployment
run: |
rsync -az -e ssh --delete public/ [email protected]:~/lo0p.it