on: [push, pull_request] name: Homepage deployment jobs: deploy: runs-on: ubuntu-latest env: HUGO_CACHEDIR: /tmp/hugo_cache steps: - name: Setup Go uses: actions/setup-go@v5 with: go-version: "^1.23.3" - name: Setup Minio Client run: wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc && cp mc /usr/local/bin - name: Clone repository uses: actions/checkout@v4 - name: Cache Hugo modules uses: actions/cache@v4 with: path: ${{ env.HUGO_CACHEDIR }} key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-hugomod- - name: Setup Hugo uses: https://github.com/peaceiris/actions-hugo@v3 with: hugo-version: "0.139.3" - name: Build run: hugo --minify - name: Add Minio credentials run: mc alias set deploy "${{ vars.MINIO_ENDPOINT }}" "${{ secrets.MINIO_ACCESS_KEY }}" "${{ secrets.MINIO_SECRET_KEY }}" - name: Deploy run: mc mirror --overwrite ./public deploy/homepage-source