Skip to content

Mcbed doc refactor

Mcbed doc refactor #3

Workflow file for this run

name: Documentation
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the main branch
push:
branches: [ main ]
# Triggers the workflow on pull request events
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build_documentation"
build_documentation:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build documentation
run: mkdocs build --config-file docs/mkdocs.yml

Check failure on line 39 in .github/workflows/deploy-docs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-docs.yml

Invalid workflow file

You have an error in your yaml syntax on line 39
- name: Create commit
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
git clone https://github.com/ICube-Robotics/ecat_ros2_workshop.git --branch gh-pages --single-branch gh-pages
cp -r docs/site/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
- name: Push changes
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}