Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "root" option to actions/publish #51

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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