GamesWebsite/.forgejo/workflows/main.yml
Ell 71d4d1b4a7
All checks were successful
/ main (push) Successful in 28s
reflect site repurpose
2024-08-14 13:45:11 +02:00

28 lines
976 B
YAML

on:
push:
branches: [main]
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup node
uses: https://github.com/actions/setup-node@v4
with:
node-version: 18
- name: Build
run: |
cd src
npm ci
npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
cp .htaccess ../out
- name: Deploy
run: |
apt update && apt install -y rsync
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' out/ ellbot@ssh.ellpeck.de:/var/www/games