TypeScript 5.6 번역 #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create issue to markdown file when the publish label is attached | |
on: | |
issues: | |
types: [labeled] | |
env: | |
CONTENT_TITLE: ${{ github.event.issue.title }} | |
CONTENT_BODY: ${{ github.event.issue.body }} | |
jobs: | |
publish: | |
if: contains(github.event.label.name, 'publish') && (github.actor == 'hustle-dev') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Create markdown file | |
run: | | |
rm -rf "contents/${CONTENT_TITLE}" | |
mkdir "contents/${CONTENT_TITLE}" | |
cd "contents/${CONTENT_TITLE}" | |
echo "${CONTENT_BODY}" > index.md | |
cd "../../" | |
yarn convert "contents/${CONTENT_TITLE}/index.md" | |
- name: Push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name hustle-dev | |
git add . | |
git commit -m "docs: 문서가 생성되었습니다." | |
git push | |
- name: Deploy | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }} | |
yarn deploy |