From 90b03819d7c2a156271b23dfdf9fafba3fda52f9 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Wed, 1 Nov 2023 19:04:25 -0700 Subject: [PATCH] should fix deploy issues --- .github/workflows/hugo.yaml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index d386639..b661fcf 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -24,11 +24,23 @@ jobs: extended: true - name: Build - run: hugo --minify - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public \ No newline at end of file + path: ./public + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2