forked from LukeSmithxyz/based.cooking
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1011 Bytes
/
upload.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
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push to master (including merged PRs)
push:
branches: [ master ]
# 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:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.STYLE_SSH }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa kochenmit.style >> ~/.ssh/known_hosts
- name: Connect to Server and Execute Commands
run: |
ssh -p ${{ secrets.STYLE_PORT }} ${{ secrets.STYLE_USER }}@kochenmit.style << EOF
cd kochenmit.style
git stash
git pull --force origin master
hugo -s . -t $HOME/glulo -d /var/www/kochenmitstyle/ --cacheDir ~/hugocache
EOF