upd #10
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: Publish Docs | |
on: [push] | |
jobs: | |
build: | |
name: Publish AsciiDocs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Run the build process with Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: asciidoctor/docker-asciidoctor:1.17.1 | |
options: -v ${{ github.workspace }}:/documents/ | |
run: | | |
echo "Publishing AsciiDocs" | |
mkdir -p output | |
asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output docs/*.adoc | |
asciidoctor-pdf -D /documents/output docs/*.adoc | |
ls -ltr output | |
echo "Done with AsciiDocs" | |
cd output ; cp -R ../docs/images images; cp -R ../docs/cockpit-ui cockpit-ui | |
git init | |
echo "user ${{ secrets.GH_USER_NAME }}" | |
git config user.name "${{ secrets.GH_USER_NAME }}" | |
git config user.email "${{ secrets.GH_USER_EMAIL }}" | |
git add . ; git commit -m "Deploy to GitHub Pages" | |
git push --force "https://${{ secrets.GITHUB_TOKEN }}@${{ github.ref }}" master:gh-pages |