*** enable pull request #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: {} | |
workflow_run: | |
workflows: | |
- Artifact | |
types: | |
- completed | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
ref: artifact | |
path: artifact | |
- name: Build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
sudo apt -y install jq pandoc | |
pandoc -v | |
bash ./build.sh | |
ls -l dist | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add dist -f | |
git commit -m gh-pages-split | |
git subtree split --prefix dist -b gh-pages-split | |
target=gh-pages | |
[ -n "$GITHUB_HEAD_REF" ] && target=gh-pages-preview | |
git push origin gh-pages-split:$target -f |