Skip to content

Update upload.yml

Update upload.yml #21

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.2
with:
ssh-private-key: ${{ secrets.STYLE_SSH }}
- name: Connect to Server and Run Commands
run: |
mkdir -p ~/.ssh
ssh-keyscan -t rsa -p ${{ secrets.STYLE_PORT }} kochenmit.style >> ~/.ssh/known_hosts
ssh -o StrictHostKeyChecking=yes -t -p ${{ secrets.STYLE_PORT }} ${{ secrets.STYLE_USER }}@kochenmit.style "\
cd kochenmit.style \
&& git stash \
&& git pull --force origin main \
&& hugo -s . -t $HOME/glulo -d /var/www/kochenmitstyle/ --cacheDir ~/hugocache"