-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first shot at making this an action may have issues with the run command
- Loading branch information
1 parent
4d5a16b
commit 2a9a53c
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: 'PyObsidianParser' | ||
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' | ||
- name: Install Dependencies | ||
run: pip install -r requirements.txt | ||
shell: bash | ||
- name: Export Obsidian Notes | ||
shell: bash | ||
run: | | ||
echo "INPUT_NUM=${{ inputs.num }}" >> $GITHUB_ENV | ||
- name: Fetch the number's square | ||
id: export-notes | ||
shell: bash | ||
run: python main.py --hugo-content-dir ${{ inputs.hugo-content-dir }} --obsidian-vault-dir ${{ inputs.obsidian-vault-dir }} --export-dir ${{ inputs.export-dir }} |