Skip to content

Commit 8f0064e

Browse files
committed
Refactor issue action
1 parent c6992da commit 8f0064e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: .github/workflows/create-newsletter.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
sed -i "s/{{\s*NEWSLETTER_DEADLINE\s*}}/${{ env.NEWSLETTER_DEADLINE }}/g" index.md
2929
sed -i "s/{{\s*NEWSLETTER_COUNTER\s*}}/${{ env.NEWSLETTER_COUNTER }}/g" index.md
3030
# Create a dir in content/news with the counter with 3 digits as name
31-
mkdir -p content/news/$(printf "%03d" ${{ env.NEWSLETTER_COUNTER }})
32-
mv index.md content/news/$(printf "%03d" ${{ env.NEWSLETTER_COUNTER }})
31+
destination="content/news/$(printf "%03d" ${{ env.NEWSLETTER_COUNTER }})"
32+
mkdir -p $destination
33+
mv index.md $destination/index.md
34+
git status
3335
- name: Commit and push changes
3436
uses: EndBug/add-and-commit@v9
3537
with:

0 commit comments

Comments
 (0)