diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index db0c883..130875d 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -1,29 +1,34 @@ -name: Deploy Hugo site +name: GitHub Pages on: push: branches: - - main # Deploy when changes are pushed to "main" + - main # Set a branch to deploy + pull_request: jobs: deploy: - runs-on: ubuntu-latest - + runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} steps: - - name: Checkout the repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Install Hugo + - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: 'latest' + hugo-version: '0.119.0' + # extended: true - - name: Build the site + - name: Build run: hugo --minify - - name: Deploy to GitHub Pages + - name: Deploy uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public - + publish_dir: ./public \ No newline at end of file