Skip to content

Merge pull request #229 from andreaswolf/release-0.4.0 #138

Merge pull request #229 from andreaswolf/release-0.4.0

Merge pull request #229 from andreaswolf/release-0.4.0 #138

Workflow file for this run

name: Docs
on:
push:
branches:
- "main"
jobs:
docs:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
# see https://github.com/ramsey/composer-install
- name: "Install Composer dependencies"
uses: ramsey/composer-install@v3
- name: "Generate documentation"
run: "composer docs"
- name: 'Set Branch Name'
id: set-branch-name
run: |
branch_name="dynamic-branch-$(date +'%Y%m%d%H%M%S')"
echo "::set-output name=branch_name::$branch_name"
- name: "Commit documentation"
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: '*.md'
disable_globbing: true
commit_message: '[DOCS] Generate documentation'
commit_options: '--no-verify --signoff'
create_branch: true
branch: "feature-create-docs-${{ steps.set-branch-name.outputs.branch_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Create Pull Request"
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "feature-create-docs-${{ steps.set-branch-name.outputs.branch_name }}"