name: Build the web book on: push: branches: [main] workflow_dispatch: jobs: build_docs: runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: "3.11" - name: Install docgen run: pip install ./doc - name: Generate file run: hexdoc doc/properties.toml -o index.html.uncommitted - name: Check out gh-pages uses: actions/checkout@v3 with: clean: false ref: gh-pages - name: Overwrite file and commmit run: | mv index.html.uncommitted index.html git config user.name "HexDoc Bot" git config user.email "noreply@github.com" git add index.html git diff-index --quiet HEAD || git commit -m "Update web book from $GITHUB_REF" - name: Upload changes run: git push