dploy.yml
This commit is contained in:
parent
f5191a962d
commit
e518bb85bf
|
|
@ -0,0 +1,43 @@
|
||||||
|
name: Forgejo Build & Deploy (Ed25519)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 🛒 Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🐍 Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: 📦 Install
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
- name: 🔨 Build
|
||||||
|
run: pelican content -o output -s src/dlw/ssg_config/pelicanconf.py
|
||||||
|
|
||||||
|
- name: 🚀 Sync (Ed25519)
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
SSH_USER: ${{ secrets.UBERSPACE_USER }}
|
||||||
|
SSH_HOST: ${{ secrets.UBERSPACE_HOST }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
# Verwendung von ed25519 statt rsa
|
||||||
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519" output/ ${SSH_USER}@${SSH_HOST}:/var/www/virtual/${SSH_USER}/html/
|
||||||
Loading…
Reference in New Issue