From b3a939d1fe9c0b88550c0021feb8e2ea12bf9535 Mon Sep 17 00:00:00 2001 From: MxShun <16466322+MxShun@users.noreply.github.com> Date: Sun, 20 Aug 2023 12:34:01 +0900 Subject: [PATCH 1/2] Add root option to actions/publish --- actions/publish/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/actions/publish/action.yml b/actions/publish/action.yml index e2d15dd..de32b30 100644 --- a/actions/publish/action.yml +++ b/actions/publish/action.yml @@ -3,6 +3,10 @@ description: "Publish articles to Qiita using qiita-cli" author: "Qiita Inc." inputs: + root: + required: false + default: '.' + description: "Root directory path" qiita-token: required: true description: "Qiita API token" @@ -17,13 +21,13 @@ runs: run: npm install -g @qiita/qiita-cli@v1.0.0 shell: bash - name: Publish articles - run: qiita publish --all + run: qiita publish --all --root ${{ inputs.root }} env: QIITA_TOKEN: ${{ inputs.qiita-token }} shell: bash - name: Commit and push diff # Not executed recursively even if `push` is triggered. See https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow run: | - git add public/* + git add ${{ inputs.root }}/public/* if ! git diff --staged --exit-code --quiet; then git config --global user.name 'github-actions[bot]' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' From e690d90522aa19458c656bf9f69afb97e2d74499 Mon Sep 17 00:00:00 2001 From: MxShun <16466322+MxShun@users.noreply.github.com> Date: Tue, 22 Aug 2023 00:29:10 +0900 Subject: [PATCH 2/2] lint --- actions/publish/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/publish/action.yml b/actions/publish/action.yml index de32b30..bcf2a1d 100644 --- a/actions/publish/action.yml +++ b/actions/publish/action.yml @@ -5,7 +5,7 @@ author: "Qiita Inc." inputs: root: required: false - default: '.' + default: "." description: "Root directory path" qiita-token: required: true