File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ concurrency:
1313 cancel-in-progress : true
1414
1515permissions :
16+ contents : write
1617 pages : write
1718 id-token : write
1819
5253 - name : Deploy to GitHub Pages
5354 id : deploy
5455 uses : actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
56+
57+ # search.quarkus.io expects that the rendered content is available in gh-pages branch
58+ - name : Sync gh-pages branch
59+ run : |
60+ SITE_DIR=$(mktemp -d)
61+ rsync -a ./_site/ "$SITE_DIR"
62+
63+ git config --local user.email "action@github.com"
64+ git config --local user.name "GitHub Action"
65+
66+ git fetch origin gh-pages:gh-pages
67+ git checkout gh-pages
68+
69+ rsync -a --delete --exclude='.git' --exclude='.nojekyll' "$SITE_DIR"/ .
70+ git add -A
71+ git rm -rf --cached --ignore-unmatch _site
72+
73+ git commit --allow-empty -m "deploy: ${{ github.sha }}"
74+ git push origin gh-pages
You can’t perform that action at this time.
0 commit comments