2024-01-13 16:48:40 +01:00
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
web:
|
|
|
|
runs-on: ubuntu-latest
|
2024-01-13 16:52:42 +01:00
|
|
|
env:
|
|
|
|
BUNDLE_GEMFILE: ${{ github.workspace }}/web/Gemfile
|
2024-01-13 16:48:40 +01:00
|
|
|
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: |
|
2024-01-13 17:01:07 +01:00
|
|
|
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
|
|
|
echo "Host *
|
|
|
|
StrictHostKeyChecking no
|
|
|
|
ProxyCommand cloudflared access ssh --hostname %h" >> ~/.ssh/config
|
|
|
|
echo "${{ secrets.ELLBOT_KEY }}" >> ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
|
|
|
rsync -e "ssh -o StrictHostKeyChecking=no -P 222" -r --delete web/_site/. ellbot@ssh.ellpeck.de:/var/www/tinylifegame
|