Quarto Orginse #23
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
# Only trigger, when the build workflow succeeded | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Quarto Publish"] | |
types: | |
- completed | |
name: Quarto Orginse | |
jobs: | |
build-orginse: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
ref: book-depoly | |
- name: Create Book folder | |
run: | | |
git branch | |
ls -R && pwd | |
mkdir -p gh-pages/quartobook | |
shopt -s extglob | |
cp -r !(gh-pages) gh-pages/quartobook/ | |
ls -R gh-pages/quartobook/ && pwd | |
- name: Commit and push changes | |
run: | | |
git add gh-pages/ | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@github.com" | |
git commit -am "Move Book to GitHub Pages" || true | |
git checkout gh-pages | |
git pull origin gh-pages | |
git merge origin/gh-pages | |
git push origin gh-pages |