diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c825d7c..cfaf753 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -25,10 +25,9 @@ jobs: run: sudo snap install dart-sass-embedded - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: recursive - persist-credentials: false - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" @@ -41,7 +40,7 @@ jobs: run: hugo --minify - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v1 with: path: ./public retention-days: '5' diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 965e02e..df55223 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -5,7 +5,10 @@ on: branches: ["main"] workflow_dispatch: -permissions: {} +permissions: + contents: read + pages: write + id-token: write # Allow one concurrent deployment concurrency: @@ -21,27 +24,24 @@ jobs: runs-on: ubuntu-latest env: HUGO_VERSION: 0.108.0 - permissions: - contents: read steps: - name: Install Hugo CLI run: | - wget -O "${RUNNER_TEMP}/hugo.deb" https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i "${RUNNER_TEMP}/hugo.deb" + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb - name: Install Dart Sass Embedded run: sudo snap install dart-sass-embedded - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: recursive - persist-credentials: false - name: Setup Pages id: pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@v2 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" @@ -51,14 +51,13 @@ jobs: # For maximum backward compatibility with Hugo modules HUGO_ENVIRONMENT: production HUGO_ENV: production - BASE_URL: ${{ steps.pages.outputs.base_url }} run: | hugo \ --minify \ - --baseURL "${BASE_URL}/" + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v1 with: path: ./public @@ -69,11 +68,8 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build - permissions: - pages: write - id-token: write steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v1