From a2c27efdeb16e494fefc462ea860dbe8451bb207 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 13 Jan 2024 18:59:43 +0100 Subject: [PATCH] switch to FJ actions --- .forgejo/workflows/main.yml | 25 +++++++++++++++++++++++++ .woodpecker/main.yml | 15 --------------- 2 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 .forgejo/workflows/main.yml delete mode 100644 .woodpecker/main.yml diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml new file mode 100644 index 0000000..88693f5 --- /dev/null +++ b/.forgejo/workflows/main.yml @@ -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 diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml deleted file mode 100644 index 846873d..0000000 --- a/.woodpecker/main.yml +++ /dev/null @@ -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