switch to FJ actions
This commit is contained in:
parent
2b75f5f5c4
commit
a2c27efdeb
2 changed files with 25 additions and 15 deletions
25
.forgejo/workflows/main.yml
Normal file
25
.forgejo/workflows/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
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: 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: |
|
||||
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/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
|
|
@ -1,15 +0,0 @@
|
|||
steps:
|
||||
build:
|
||||
image: ruby:latest
|
||||
commands:
|
||||
- cd main && bundle && bundle exec jekyll build
|
||||
deploy:
|
||||
image: debian:latest
|
||||
when:
|
||||
- event: [push, manual]
|
||||
branch: master
|
||||
commands:
|
||||
- rm -rfv /var/www/ellpeck/*
|
||||
- cp -rv main/_site/. /var/www/ellpeck
|
||||
volumes:
|
||||
- /var/www/ellpeck:/var/www/ellpeck
|
Loading…
Reference in a new issue