Skip to content

Commit 09f050d

Browse files
authored
Merge pull request #51 from MxShun/add_root_to_actions_publish
add "root" option to actions/publish
2 parents f1050c6 + e690d90 commit 09f050d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

actions/publish/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ description: "Publish articles to Qiita using qiita-cli"
33
author: "Qiita Inc."
44

55
inputs:
6+
root:
7+
required: false
8+
default: "."
9+
description: "Root directory path"
610
qiita-token:
711
required: true
812
description: "Qiita API token"
@@ -17,13 +21,13 @@ runs:
1721
run: npm install -g @qiita/qiita-cli@v1.0.0
1822
shell: bash
1923
- name: Publish articles
20-
run: qiita publish --all
24+
run: qiita publish --all --root ${{ inputs.root }}
2125
env:
2226
QIITA_TOKEN: ${{ inputs.qiita-token }}
2327
shell: bash
2428
- 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
2529
run: |
26-
git add public/*
30+
git add ${{ inputs.root }}/public/*
2731
if ! git diff --staged --exit-code --quiet; then
2832
git config --global user.name 'github-actions[bot]'
2933
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'

0 commit comments

Comments
 (0)