Web/.forgejo/workflows/main.yml
Ell 08fc481589
All checks were successful
/ web (push) Successful in 1m1s
move website content to main directory
2024-06-14 17:49:53 +02:00

30 lines
1.1 KiB
YAML

on:
push:
branches: [master]
jobs:
web:
runs-on: ubuntu-latest
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: 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"' _site/ ellbot@ssh.ellpeck.de:/var/www/ellpeck
- name: Purge Cloudflare cache
uses: https://github.com/NathanVaughn/actions-cloudflare-purge@v3.1.0
with:
cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
cf_auth: ${{ secrets.CLOUDFLARE_TOKEN }}