-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.03 KB
/
generate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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}}