added update-script because github actions doesnt work #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |