Skip to content

Commit bf115ba

Browse files
authored
Merge pull request #4553 from uchitsa/4550
Add submit a pull request by ebnf.yml
2 parents 3edc952 + c49ef90 commit bf115ba

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/ebnf.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
ebnf:
1515
timeout-minutes: 15
1616
runs-on: ubuntu-24.04
17+
permissions:
18+
contents: write
19+
pull-requests: write
1720
env:
1821
CONVERT_PATH: /tmp/antlr4-to-bnf-converter
1922
steps:
@@ -55,12 +58,19 @@ jobs:
5558
pdfcrop --margins '10 10 10 10' "${p}.pdf" "${p}-cropped.pdf"
5659
pdf2svg "${p}-cropped.pdf" "${p}.svg"
5760
convert -verbose -density 300 -quality 100 -colorspace RGB "${p}.svg" "${p}.png"
58-
mkdir -p gh-pages/ebnf
59-
cp "${p}.png" gh-pages/ebnf
60-
cp "${p}.svg" gh-pages/ebnf
61-
- uses: JamesIves/github-pages-deploy-action@v4.7.3
61+
git fetch --no-tags origin gh-pages
62+
git checkout -B update-gh-pages origin/gh-pages
63+
mkdir -p ebnf
64+
cp "${p}.png" ebnf/
65+
cp "${p}.svg" ebnf/
66+
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
67+
uses: peter-evans/create-pull-request@v7
6268
with:
63-
branch: gh-pages
64-
folder: gh-pages
65-
clean: false
66-
if: github.ref == 'refs/heads/master'
69+
sign-commits: true
70+
branch: update-gh-pages
71+
branch-suffix: timestamp
72+
commit-message: 'update gh-pages by ebnf'
73+
delete-branch: true
74+
title: 'Update gh-pages'
75+
assignees: yegor256
76+
base: gh-pages

0 commit comments

Comments
 (0)