This commit is contained in:
22
.gitea/workflows/update.yml
Normal file
22
.gitea/workflows/update.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Update Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Generate SSH Key
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "$SSH_PRIVATE_KEY" > private.key
|
||||
sudo chmod 600 private.key
|
||||
ssh-keyscan -H minicraisin > ~/.ssh/known_hosts
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
|
||||
shell: bash
|
||||
- name: Update Website
|
||||
run: |
|
||||
ssh -i private.key craisin@minicraisin "cd /home/craisin/data/personal-website && git pull"
|
||||
Reference in New Issue
Block a user