2024-10-05 12:25:41 +02:00
|
|
|
name: publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-10-06 22:35:14 +02:00
|
|
|
- test
|
2024-10-05 12:25:41 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
2024-10-06 22:35:14 +02:00
|
|
|
env:
|
|
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}
|
2024-10-05 12:25:41 +02:00
|
|
|
steps:
|
2024-10-05 12:57:23 +02:00
|
|
|
- run: apt update && apt install dnsutils -y && dig git.ifsr.de
|
|
|
|
|
2024-10-05 12:25:41 +02:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
2024-10-06 20:08:18 +02:00
|
|
|
node-version: 'lts/*'
|
2024-10-05 12:25:41 +02:00
|
|
|
|
|
|
|
- run: npm ci
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
|
2024-10-06 20:08:18 +02:00
|
|
|
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
2024-10-05 12:25:41 +02:00
|
|
|
with:
|
|
|
|
path: _site
|
|
|
|
|
2024-10-06 22:35:14 +02:00
|
|
|
- name: Deploy
|
|
|
|
run: |
|
|
|
|
eval $(ssh-agent -s)
|
|
|
|
echo "$SSH_PRIVATE_KEY" | ssh-add -
|
|
|
|
apt-get update && apt-get install -y rsync
|
|
|
|
mkdir ~/.ssh
|
|
|
|
ssh-keyscan quitte.ifsr.de > ~/.ssh/known_hosts
|
|
|
|
rsync -rvh --progress --delete _site/ ese-deploy@quitte.ifsr.de:2024-test
|