-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1011 Bytes
/
qiita_sync.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: Qiita Sync
on:
# push:
# branches:
# - main
workflow_dispatch:
jobs:
qiita_sync_check:
name: Run qiita-sync sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install qiita-sync
run: |
python -m pip install qiita-sync
- name: Run qiita-sync
run: |
qiita_sync sync .
env:
QIITA_ACCESS_TOKEN: ${{ secrets.QIITA_ACCESS_TOKEN }}
- name: Git
run: |
find . -name '*.md' -not -path './.*' | xargs git add
if ! git diff --staged --exit-code --quiet
then
git config user.name github-actions
git config user.email github-actions@github.com
find . -name '*.md' -not -path './.*' | xargs git add
git commit -m "updated by qiita-sync"
git push
fi