Skip to content

PostMeta에 slug 필드 추가, url 복사 개선 #13

PostMeta에 slug 필드 추가, url 복사 개선

PostMeta에 slug 필드 추가, url 복사 개선 #13

Workflow file for this run

name: Fetch Files
on:
push:
paths:
- 'post/**'
workflow_dispatch: # 수동으로도 실행 가능
jobs:
fetch_and_trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Node.js dependencies
run: npm install
- name: Fetch GitHub file list
run: node fetch_files.js
- name: Commit and push changes
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git restore package-lock.json
git add post_files.json
git commit -m "Update post_files.json with the latest post data"
git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Build Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const dispatch = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "deploy.yml",
ref: "main",
});