aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorikoamu <ikoamu@gmail.com>2024-03-16 20:46:02 +0900
committerikoamu <ikoamu@gmail.com>2024-03-16 20:46:02 +0900
commit86a9f240baa3feec18934bccc86e643203f7652f (patch)
tree5497c8867b16ccfd51826ac9a5011da378aac161
parent9e50be053905a147949f9f7f2963d0d1e75e837f (diff)
Add org-roam-directory option to workflow and action
-rw-r--r--.github/workflows/publish-example.yml1
-rw-r--r--action.yml12
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
diff --git a/action.yml b/action.yml
index 30ae6f9..b1eb82d 100644
--- a/action.yml
+++ b/action.yml
@@ -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