From 1b27c35f1a472bbc8dff060afe1e51d9f2c1ed7a Mon Sep 17 00:00:00 2001 From: "Jens M. Sauer" Date: Mon, 17 Jun 2024 12:11:11 +0200 Subject: [PATCH] Add GitaActions Setup GiteaAction to deploy website. --- .gitea/workflows/dev.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitea/workflows/dev.yml diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml new file mode 100644 index 0000000..3964c3a --- /dev/null +++ b/.gitea/workflows/dev.yml @@ -0,0 +1,36 @@ +name: Deploy Hugo + +on: + push: + branches: + - dev + +jobs: + deploy: + runs-on: ubuntu-latest + container: + image: debian:12 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: hugo rclone + version: 1.0 + + - name: Decode rclone config + env: + CONFIG: ${{ secrets.RCLONE_CONFIG }} + run: | + echo $RCLONE_CONFIG | base64 --decode > rclone.conf + + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Build + run: hugo --minify --environment development + + - name: Deploy + run: rclone --config rclone.conf copy public/ remote:staging