ese-website/.forgejo/workflows/publish.yaml
Lyn Fugmann 124aab344a
All checks were successful
publish / publish (push) Successful in 31s
test deploy 3
2024-10-06 22:48:30 +02:00

41 lines
917 B
YAML

name: publish
on:
push:
branches:
- test
jobs:
publish:
runs-on: ubuntu-latest
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run build
- name: upload artifact
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 ifsr.de > ~/.ssh/known_hosts
rsync -rvh --progress --delete --chmod=ugo=rwX _site/ ese-deploy@ifsr.de:2024-test