Skip to content

Commit

Permalink
chore: workflows를 수정하여 마크다운 업데이트 자동화
Browse files Browse the repository at this point in the history
  • Loading branch information
leeari95 committed Jul 27, 2024
1 parent 2fc15b2 commit c95f14c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 55 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/build.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/update-markdown-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update Markdown Files

on:
push:
branches:
- main

jobs:
update-markdown:
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "5.10.1"
run: swift --version

- name: Run Swift script and check result
working-directory: ${{ github.workspace }}
run: |
if swift run Script; then
echo "Script executed successfully"
else
echo "Script execution failed"
exit 1
fi
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "chore: Update markdown files"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit c95f14c

Please sign in to comment.