GamesWebsite/.forgejo/workflows/main.yml
Ell 27bc7564bc
All checks were successful
/ main (push) Successful in 28s
use the correct dir for action ...
2024-04-01 15:56:19 +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/press