From 49833899fa2ab8b418b74ab9988b61cb293ceb9a Mon Sep 17 00:00:00 2001 From: brooke Date: Sat, 9 Mar 2024 22:28:32 +0000 Subject: [PATCH] Update .gitea/workflows/build-test.yaml --- .gitea/workflows/build-test.yaml | 38 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.gitea/workflows/build-test.yaml b/.gitea/workflows/build-test.yaml index bee3a5c..8ff249b 100644 --- a/.gitea/workflows/build-test.yaml +++ b/.gitea/workflows/build-test.yaml @@ -1,30 +1,26 @@ name: Hugo -on: [push] +on: + push: + branches: + - main jobs: build: - - runs-on: ubuntu-22.04 - + runs-on: hugo-latest steps: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Grab packages - run: | - apt-get update && \ - apt-get install -y jq rsync tar wget && \ - wget https://github.com/gohugoio/hugo/releases/download/v0.123.6/hugo_extended_0.123.6_linux-amd64.tar.gz && \ - tar -xzvf hugo_extended_0.123.6_linux-amd64.tar.gz && \ - chmod +x hugo - - name: Run build task - run: ./hugo --minify --logLevel info - - name: Test static page - run: bash ${{ gitea.workspace }}/bin/test_static_page.sh - - name: Deploy to Server - uses: easingthemes/ssh-deploy@main - env: + - name: Grab packages + run: apk add rsync openssh-client + - uses: actions/checkout@v4 + with: + submodules: 'true' + - name: Run build task + run: hugo --minify + - name: Test static page + run: bash ${{ gitea.workspace }}/bin/test_static_page.sh + - name: Deploy to Server + uses: easingthemes/ssh-deploy@main + env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} ARGS: "-rlgoDzvc -i --delete" SOURCE: "public/"