diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81f9d40..b7e877f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,12 @@ jobs: - name: Build site run: make build + - name: Copy CNAME + run: | + if [ -f CNAME ]; then + cp CNAME ${{ env.PUBLISH_DIR }}/ + fi + - name: Deploy to GitHub Pages if: github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v4 @@ -38,3 +44,10 @@ jobs: publish_dir: ${{ env.PUBLISH_DIR }} publish_branch: ${{ env.PUBLISH_BRANCH }} commit_message: "Deploy site to GitHub Pages - ${{ github.sha }}" + + - name: Refresh GitHub Pages Cache + if: github.ref == 'refs/heads/main' + run: | + curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/${{ github.repository }}/pages/builds || echo "Failed to refresh GitHub Pages cache"