diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b612602..1d87566 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,19 +1,29 @@ -name: Deploy Docusaurus +name: Deploy static content to Pages on: release: types: [published] + workflow_dispatch: +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: write + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +concurrency: + group: "pages" + cancel-in-progress: false jobs: deploy: - name: Deploy to GitHub Pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest - steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v4 - name: Setup Bun @@ -27,13 +37,14 @@ jobs: - name: Build website run: bun run build - - 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.ACCESS_TOKEN }} - publish_dir: ./build - publish_branch: published - user_name: "github-actions[bot]" - user_email: "github-actions[bot]@users.noreply.github.com" - commit_message: "Deploy website - based on ${{ github.sha }}" - cname: ${{ vars.CNAME }} # Changed from secrets to vars since it's not sensitive + path: "./build" # Upload the Docusaurus build output + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4