40 lines
908 B
YAML
40 lines
908 B
YAML
name: publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- test
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}
|
|
steps:
|
|
- run: apt update && apt install dnsutils -y && dig git.ifsr.de
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
|
|
|
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
path: _site
|
|
|
|
- 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
|