-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
34 additions
and
169 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,52 @@ | ||
name: Update Markdown Files | ||
name: Update Markdown Files and Deploy to Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# GitHub Pages에 배포할 수 있도록 GITHUB_TOKEN의 권한을 설정합니다. | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-markdown: | ||
runs-on: macos-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Swift | ||
- name: Install 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 | ||
if swift run Scripts; then | ||
echo "Script executed successfully" | ||
else | ||
echo "Script execution failed" | ||
exit 1 | ||
fi | ||
- name: Commit changes | ||
- name: Build Documentation | ||
working-directory: ${{ github.workspace }} | ||
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" | ||
swift package --allow-writing-to-directory ./docs \ | ||
generate-documentation --target AriNote \ | ||
--disable-indexing \ | ||
--transform-for-static-hosting \ | ||
--output-path ./docs | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4.6.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
branch: gh-pages | ||
folder: docs |
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
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
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
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
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
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
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
File renamed without changes.
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