Web/.forgejo/workflows/main.yml
Ell 20a783b1ba
All checks were successful
/ web (push) Successful in 2m10s
re-enable cache
2024-01-14 11:48:12 +01:00

28 lines
953 B
YAML

on:
push:
branches: [master]
jobs:
web:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/main/Gemfile
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Ruby
uses: https://github.com/ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Build
run: cd main && bundle exec jekyll build
- 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"' main/_site/ ellbot@ssh.ellpeck.de:/var/www/ellpeck