From 03819b09d682637e8b3b14b5e375309e5a99876c Mon Sep 17 00:00:00 2001 From: Anthony Byansi <101401469+AnthonyByansi@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:08:58 +0300 Subject: [PATCH] Refactor github actions workflow to use only first-party actions for github pages deployment --- .github/ISSUE_TEMPLATE/workflows/deploy.yaml | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml index d4a0629..1c8b107 100644 --- a/.github/ISSUE_TEMPLATE/workflows/deploy.yaml +++ b/.github/ISSUE_TEMPLATE/workflows/deploy.yaml @@ -26,9 +26,21 @@ jobs: cat README.md | markdown >> index.html echo '' >> index.html - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./ - keep_files: false + path: index.html + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build-and-deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4