Skip to content

Commit

Permalink
Merge pull request #51 from MxShun/add_root_to_actions_publish
Browse files Browse the repository at this point in the history
add "root" option to actions/publish
  • Loading branch information
getty104 authored Aug 21, 2023
2 parents f1050c6 + e690d90 commit 09f050d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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'
Expand Down

0 comments on commit 09f050d

Please sign in to comment.