Skip to content

Workflows

Workflows #5

Workflow file for this run

name: Build and push Jekyll
on:
push:
branches: ["main"]
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "jekyll_build"
cancel-in-progress: false
jobs:
push_docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./petitbonhomme
destination: ./docs
- name: Push docs/ to remote
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add docs/
git commit -m "Bot: Auto-Generation of the docs/ folder" || echo "No changes to commit"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git push origin HEAD