diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000..bdad652 --- /dev/null +++ b/.github/workflows/action.yaml @@ -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 }} \ No newline at end of file