2024-01-13 18:59:43 +01:00
|
|
|
on:
|
|
|
|
push:
|
2024-01-13 19:00:24 +01:00
|
|
|
branches: [master]
|
2024-01-13 18:59:43 +01:00
|
|
|
jobs:
|
|
|
|
web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
BUNDLE_GEMFILE: ${{ github.workspace }}/main/Gemfile
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Ruby
|
2024-01-13 19:01:00 +01:00
|
|
|
uses: https://github.com/ruby/setup-ruby@v1
|
2024-01-13 18:59:43 +01:00
|
|
|
with:
|
|
|
|
ruby-version: 3.2.2
|
|
|
|
- name: Build
|
|
|
|
run: cd main && bundle exec jekyll build
|
|
|
|
|
|
|
|
- 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
|
2024-01-13 20:26:07 +01:00
|
|
|
echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
2024-01-13 18:59:43 +01:00
|
|
|
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' main/_site/. ellbot@ssh.ellpeck.de:/var/www/ellpeck
|