Skip to content

Commit 3d1a922

Browse files
committed
ajoute une automatisation de l'import des notes de write.apreslanu.it
1 parent 2e7ec94 commit 3d1a922

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: "[writefreely] retrieve notes"
3+
4+
on:
5+
workflow_dispatch:
6+
repository_dispatch:
7+
types:
8+
- new_note
9+
10+
jobs:
11+
retrieve_notes:
12+
13+
runs-on: "ubuntu-latest"
14+
15+
permissions:
16+
contents: write
17+
18+
strategy:
19+
max-parallel: 1
20+
matrix:
21+
collections:
22+
- tk
23+
- offload
24+
- weeknotes
25+
26+
steps:
27+
- uses: "actions/checkout@v4"
28+
with:
29+
ref: ${{ github.head_ref }}
30+
- uses: "actions/setup-python@v2"
31+
with:
32+
python-version: "3.9"
33+
- name: "go to `./scripts`"
34+
run: |
35+
cd scripts
36+
- name: "install dependencies"
37+
run: |
38+
pip install -r scripts/requirements.txt
39+
- name: "retrieve from `write.apresalnu.it`"
40+
run: |
41+
cd scripts && python import_wf_${{ matrix.collections }}.py
42+
- uses: stefanzweifel/git-auto-commit-action@v5
43+
with:
44+
commit_message: "🤖 ajoute les notes importées `write.apreslanu.it/${{ matrix.collections }}`"
45+
file_pattern: "content/write.apreslanu.it/${{ matrix.collections }}/*.md"

scripts/requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
requests
2+
python-frontmatter
3+
python-dateutil

0 commit comments

Comments
 (0)