generate documents #226
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 documents | |
on: | |
schedule: | |
- cron: '5 19 * * *' | |
workflow_dispatch: | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./generate.sh | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: update-generated-documents | |
delete-branch: true | |
add-paths: | | |
db | |
html | |
title: 'Update generated documents' | |
body: > | |
This PR is auto-generated. | |
- name: Enable auto-merge | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
gh pr merge --auto --delete-branch --merge "$PR_URL" | |
env: | |
PR_URL: "${{ steps.cpr.outputs.pull-request-url }}" | |
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |