Merge pull request #361 from Automattic/dependabot/github_actions/act… #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs | |
on: | |
push: | |
branches: | |
- trunk | |
paths: | |
- 'features/src/**/devcontainer-feature.json' | |
- 'features/src/**/NOTES.md' | |
- '.github/workflows/generate-docs.yml' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
generate-feature-docs: | |
name: Generate documentation for features | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Generate documentation | |
uses: devcontainers/action@528049dce833673f136ddfc09c2720d450029a6b # v1.4.2 | |
with: | |
generate-docs: true | |
base-path-to-features: ./features/src | |
- name: Create a PR for documentation | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | |
with: | |
add-paths: ':(glob)features/src/**/README.md' | |
commit-message: 'docs: automated documentation update' | |
title: 'docs: automated documentation update' | |
body: 'Update documentation for features' | |
labels: docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |