Skip to content

Commit ae9e7ff

Browse files
Ardasakegeakman
andauthored
Add an action to sync latest doc periodically (#81)
Co-authored-by: Ege Akman <me@egeakman.dev>
1 parent e4fc626 commit ae9e7ff

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/update_doc.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Doc
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
7+
jobs:
8+
create_pr:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Clone CPython Repo
15+
run: git clone https://github.com/python/cpython venv/cpython
16+
17+
- name: Set Up Python 3.11
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install dependencies
23+
run: pip install -r requirements.txt && sudo apt install gettext -y
24+
25+
- name: Run merge.py
26+
run: python merge.py ${GITHUB_REF##*/}
27+
28+
- name: Create Pull Request
29+
uses: peter-evans/create-pull-request@v4.2.3
30+
with:
31+
commit-message: Get changes from CPython Doc for ${{ github.ref_name }}
32+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
33+
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
34+
branch: translation-update-${{ github.ref_name }}
35+
delete-branch: true
36+
title: Translation Update ${{ github.ref_name }}
37+
body: There are some changes, don't forget to translate them!
38+
labels: update
39+
reviewers: |
40+
egeakman
41+
ardasak

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ venv/
1212
.DS_Store
1313
.pospell/
1414
.potodo/
15-
.venv/
15+
.venv/

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
poutils
2+
sphinx
23
tqdm
34
pre-commit
45
polib

0 commit comments

Comments
 (0)