Skip to content

Update docs workflow #135

Update docs workflow

Update docs workflow #135

Workflow file for this run

name: Documentation
on:
push:
branches:
- master
- v*/dev
paths:
- "**.h"
- "**.hpp"
- "**.dox"
- "**.md"
- "docs/**"
- "**/docs.yml"
- '.github/**'
release:
types: [published]
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install --no-install-recommends git python3 python3-pip doxygen
sudo -H pip3 install --upgrade poxy
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare repository (on push)
if: ${{ github.event_name == 'push' }}
run: |

Check failure on line 38 in .github/workflows/docs.yml

View workflow run for this annotation

GitHub Actions / Documentation

Invalid workflow file

The workflow is not valid. .github/workflows/docs.yml (Line: 38, Col: 14): Unrecognized named-value: 'branch'. Located at position 1 within expression: branch
git fetch origin ${{ branch }}:refs/remotes/origin/${{ branch }} --tags --force
git remote set-head origin -a
git checkout ${{ branch }}
git pull --force
- name: Prepare repository (on release)
if: ${{ github.event_name == 'release' }}
run: |
git fetch origin master:refs/remotes/origin/master --tags --force
git remote set-head origin -a
git checkout ${{ github.ref_name }}
git pull --force
- name: Prepare repository (on workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
git fetch origin master:refs/remotes/origin/master --tags --force
git remote set-head origin -a
git checkout ${{ github.ref_name }}
git pull --force
- name: Generate docs
run: |
cd docs
poxy --verbose --git-tags
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
destination_dir: ${{ github.ref_name }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: Update documentation (GitHub actions deploy)