Skip to content

Commit 149ec98

Browse files
committed
🐛 fix: stop converting when published: false
1 parent 081b91f commit 149ec98

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

action.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@ runs:
5555
continue
5656
fi
5757
58-
if [[ ! -f "qiita/public/$filename.md" ]] && grep -q "published: true" "$file"; then
59-
echo "🌱 Create new Qiita article"
60-
cd ./qiita
61-
npx qiita new "$filename"
62-
cd ../
58+
if grep -q "published: true" "$file"; then
59+
if [[ ! -f "qiita/public/$filename.md" ]]; then
60+
echo "🌱 Create new Qiita article"
61+
cd ./qiita
62+
npx qiita new "$filename"
63+
cd ../
64+
fi
65+
echo "🚚 Convert $file to qiita/public/$filename.md"
66+
node ${{ github.action_path }}/dist/index.js "$file" "./qiita/public/$filename.md"
6367
fi
6468
65-
echo "🚚 Convert $file to qiita/public/$filename.md"
66-
node ${{ github.action_path }}/dist/index.js "$file" "./qiita/public/$filename.md"
6769
done
6870
shell: bash
6971
if: steps.files.outcome == 'success'

0 commit comments

Comments
 (0)