Skip to content

Commit

Permalink
feat: exposing as action
Browse files Browse the repository at this point in the history
first shot at making this an action
may have issues with the run command
  • Loading branch information
DamianFlynn committed Dec 1, 2022
1 parent 4d5a16b commit 2a9a53c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/action.yaml
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 }}

0 comments on commit 2a9a53c

Please sign in to comment.