diff options
author | ikoamu <ikoamu@gmail.com> | 2024-03-16 20:46:02 +0900 |
---|---|---|
committer | ikoamu <ikoamu@gmail.com> | 2024-03-16 20:46:02 +0900 |
commit | 86a9f240baa3feec18934bccc86e643203f7652f (patch) | |
tree | 5497c8867b16ccfd51826ac9a5011da378aac161 | |
parent | 9e50be053905a147949f9f7f2963d0d1e75e837f (diff) |
Add org-roam-directory option to workflow and action
-rw-r--r-- | .github/workflows/publish-example.yml | 1 | ||||
-rw-r--r-- | action.yml | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/publish-example.yml b/.github/workflows/publish-example.yml index 5a944ae..22db32c 100644 --- a/.github/workflows/publish-example.yml +++ b/.github/workflows/publish-example.yml @@ -19,6 +19,7 @@ jobs: - name: Deploy to GitHub Pages uses: ikoamu/org-roam-ui-hosting@main with: + org-roam-directory: example org-roam-db-filename: org-roam.db site-title: publish-org-roam-ui deploy-to-pages: true @@ -9,6 +9,10 @@ inputs: org-roam-db-filename: description: "org-roam db filename" required: true + org-roam-directory: + description: "org-roam directory" + required: false + default: "." site-title: description: "Site title" required: false @@ -50,17 +54,17 @@ runs: shell: bash - name: Generate graphdata.json working-directory: action - run: npm run generate --script_params='../orgs/${{ inputs.org-roam-db-filename }}' + run: npm run generate --script_params='../orgs/${{ inputs.org-roam-directory }}/${{ inputs.org-roam-db-filename }}' shell: bash - name: Create Notes working-directory: action - run: ./create_notes.sh ../orgs + run: ./create_notes.sh ../orgs/${{ inputs.org-roam-directory }} shell: bash - name: Copy org/img to ui/public/ working-directory: action run: | - if [ -d "../orgs/img" ]; then - cp -r ../orgs/img ../ui/public + if [ -d "../orgs/${{ inputs.org-roam-directory }}/img" ]; then + cp -r ../orgs/${{ inputs.org-roam-directory }}/img ../ui/public fi shell: bash |