-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
58 lines (53 loc) · 1.8 KB
/
action.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: 'py-obsidian-parser'
description: 'A GitHub Action that takes obsidian notes and prepairs for hugo or other static generators'
inputs:
hugo-content-dir:
description: 'Directory of your Hugo content directory, the obsidian notes should be processed into.'
required: true
obsidian-vault-dir:
description: 'Directory of the Obsidian vault'
required: true
export-dir:
description: 'The Obsidian vault folder the notes should be processed from.'
required: true
# outputs:
# num_squared:
# description: 'Square of the input'
# # need to specify the extra `value` field for `composite` actions
# value: ${{ steps.get-square.outputs.num_squared }}
runs:
using: 'composite'
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# cache: 'pip'
# cache-dependency-path: "${{ github.action_path }}/requirements.txt"
# architecture: "x64"
- name: Install python filters
shell: bash
run: |
python -m pip install --upgrade pip
pip install python-frontmatter
pip install numpy
# - uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip
# - run: pip install 'mydependency<2'
# shell: bash
# - run: ${{ github.action_path }}/myscript
# shell: bash
- name: List python packages
shell: bash
run: |
python -m pip list
# - name: Install Dependencies
# run: pip install -r requirements.txt
# shell: bash
- name: Export Obsidian Notes
id: export-notes
shell: bash
run: python ${{ github.action_path }}/main.py --hugo-content-dir ${{ inputs.hugo-content-dir }} --obsidian-vault-dir ${{ inputs.obsidian-vault-dir }} --export-dir ${{ inputs.export-dir }}