name: Hugo on: push: branches: - main jobs: build: runs-on: hugo-ci steps: - uses: actions/checkout@v4 with: submodules: 'true' - name: Run build task run: hugo --minify - name: pre-compress run: find ./public/* -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' \) -exec gzip -v -k -f --best {} \; - name: Deploy via rsync run: | mkdir -p ~/.ssh echo "${{ secrets.RUNNER_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa rsync -rlgoDzvc -i --delete -e "ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" public/ debian@gallowelding.com:/data/gallowelding.com