-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.11 KB
/
pull-request.yaml
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
39
40
41
on: [pull_request, workflow_dispatch]
jobs:
convert-to-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install pipenv
run: |
python -m pip install pipenv
- name: install dependencies
run: |
pipenv lock -r > requirements.txt
pip install -r requirements.txt
- name: Extract Branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo ${GITHUB_REF#refs/heads/}
id: extract_branch
- name: Convert docx to markdown
run: |
python ./.github/workflows/convert_to_md.py
- name: Commit markdown to branch
run: |
git diff
git add .
git config --local user.email "commit from ${GITHUB_REF#refs/heads/}"
git config --local user.name "Github Actions"
git commit -m "convert to md"
git push origin ${GITHUB_REF#refs/heads/}