TinyLifeWeb/.github/workflows/web.yml
2024-01-13 17:33:28 +01:00

27 lines
1 KiB
YAML

on: [push, pull_request]
jobs:
web:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/web/Gemfile
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Build
run: cd web && bundle exec jekyll build
# this is a beautiful way to deploy a website and i will not take any criticism
- name: Deploy
run: |
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
mkdir ~/.ssh && echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh -R
rsync -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' -r --delete web/_site/. ellbot@ssh.ellpeck.de:/var/www/tinylifegame