name: Deploy on: push: branches: - main workflow_dispatch: env: HUGO_VERSION: 0.160.1 DEPLOY_DIR: /var/www/davideisinger.com DITHER_CACHE_DIR: /workspace-cache/dither jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install packages run: | apt-get update apt-get install -y curl imagemagick rsync ruby-full wget wget --quiet https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb gem install bundler - name: Restore secret key env: SECRET_KEY: ${{ secrets.SECRET_KEY }} run: | printf '%s' "$SECRET_KEY" > secret.key - name: Verify RSS template diff run: ./bin/check-rss-template - name: Build site run: ./bin/build - name: Deploy site run: ./bin/deploy-local "${DEPLOY_DIR}"