-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) ยท 1.26 KB
/
update-readme.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
# ์ด ์ํฌํ๋ก์ฐ๋ update.py ํ์ผ์ ์คํํฉ๋๋ค. ์ฆ README.md ํ์ผ์ ์
๋ฐ์ดํธํฉ๋๋ค.
name: Update readme # GitHub Actions ํญ์์ ํ์ธํ ์ ์๋ ์ก์
์ด๋ฆ
on: # jobs๊ฐ ์คํ๋์ด์ผ ํ๋ ์ํฉ ์ ์
push:
branches: [ "main" ] # main ๋ธ๋์น์ push๊ฐ ๋ฐ์ํ์ ๋
pull_request:
jobs: # ์ค์ ์คํ๋ ๋ด์ฉ
build:
runs-on: ubuntu-latest # ๋น๋ ํ๊ฒฝ
steps:
- uses: actions/checkout@v3 # checkout
- name: Set up Python 3.10
uses: actions/setup-python@v3 # setup-python
with:
python-version: "3.10" # 3.10๋ฒ์ ํ์ด์ฌ ์ฌ์ฉ
- name: Install dependencies # 1) ์คํฌ๋ฆฝํธ์ ํ์ํ dependency ์ค์น
run: |
python -m pip install --upgrade pip
pip install python-leetcode
- name: Run update.py # 2) update.py ์คํ
run: |
python update.py
- name: Commit changes # 3) ์ถ๊ฐ๋ ํ์ผ commit
run: |
git config --global user.name 'HyunSoo730' # ์ ์ ๋ช
git config --global user.email '[email protected]' # ์ ์ ์ด๋ฉ์ผ
git add -A
git diff --exit-code || git commit -am "auto update README.md" # ์ปค๋ฐ ๋ฉ์์ง
- name: Push changes # 4) ๋ฉ์ธ์ ํธ์
run: |
git push