From 5d5d9f8594b1a3bca51019dfb1daa86224212495 Mon Sep 17 00:00:00 2001 From: Ari Date: Sat, 27 Jul 2024 17:26:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-markdown-files.yml | 62 +++++++++++----- Package.swift | 2 +- Sources/AriNote/TIL.docc/CS.md | 21 +----- Sources/AriNote/TIL.docc/Git.md | 5 +- Sources/AriNote/TIL.docc/Rx.md | 8 +-- Sources/AriNote/TIL.docc/Swift.md | 30 +------- Sources/AriNote/TIL.docc/SwiftUI.md | 10 +-- Sources/AriNote/TIL.docc/UIKit.md | 70 +------------------ ...IBOutlet_didSet,_updateViewConstraints.md} | 0 Sources/AriNote/TIL.docc/Xcode.md | 12 +--- 10 files changed, 51 insertions(+), 169 deletions(-) rename Sources/AriNote/TIL.docc/UIKit/{211123_App_Life_Cycle,_init(frame:),_init(coder:),_frame,_bounds,_IBOutlet_didSet,_updateViewConstraints.md => 211123_App_Life_Cycle,_UIView_init,_frame_vs_bounds,_IBOutlet_didSet,_updateViewConstraints.md} (100%) diff --git a/.github/workflows/update-markdown-files.yml b/.github/workflows/update-markdown-files.yml index 4cc19a8..2b63fe5 100644 --- a/.github/workflows/update-markdown-files.yml +++ b/.github/workflows/update-markdown-files.yml @@ -1,45 +1,69 @@ -name: Update Markdown Files +name: Update Markdown Files and Deploy to Pages on: push: branches: - main +# GitHub Pages 에 배포하기 위한 GITHUB_TOKEN 권한 설정 + +concurrency: + group: "pages" + cancel-in-progress: true + 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 + if swift run Scripts; 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" + deploy: + runs-on: macos-latest + needs: update-markdown + + permissions: + contents: read + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} - - name: Push changes - uses: ad-m/github-push-action@master + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Build Documentation + working-directory: ${{ github.workspace }} + run: | + swift package --allow-writing-to-directory ./docs \ + generate-documentation --target AriNote \ + --disable-indexing \ + --transform-for-static-hosting \ + --output-path ./docs + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file + path: 'docs' + + - name: Deploy to Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/Package.swift b/Package.swift index 670f7d6..c37b9ea 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.0 +// swift-tools-version: 5.10.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Sources/AriNote/TIL.docc/CS.md b/Sources/AriNote/TIL.docc/CS.md index 217651a..d3cee0c 100644 --- a/Sources/AriNote/TIL.docc/CS.md +++ b/Sources/AriNote/TIL.docc/CS.md @@ -6,23 +6,4 @@ Computer Science @TitleHeading("Overview") } - -## Topics -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/Git.md b/Sources/AriNote/TIL.docc/Git.md index 3ed3e86..c4832e8 100644 --- a/Sources/AriNote/TIL.docc/Git.md +++ b/Sources/AriNote/TIL.docc/Git.md @@ -6,7 +6,4 @@ Git 관련 지식 @TitleHeading("Overview") } -## Topics -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/Rx.md b/Sources/AriNote/TIL.docc/Rx.md index df59a86..3fe157c 100644 --- a/Sources/AriNote/TIL.docc/Rx.md +++ b/Sources/AriNote/TIL.docc/Rx.md @@ -6,10 +6,4 @@ RxSwift를 활용한 비동기 프로그래밍 @TitleHeading("Overview") } - -## Topics -- -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/Swift.md b/Sources/AriNote/TIL.docc/Swift.md index e39727b..fdff399 100644 --- a/Sources/AriNote/TIL.docc/Swift.md +++ b/Sources/AriNote/TIL.docc/Swift.md @@ -6,32 +6,4 @@ @TitleHeading("Overview") } - -## Topics -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/SwiftUI.md b/Sources/AriNote/TIL.docc/SwiftUI.md index 995c423..ab0cbef 100644 --- a/Sources/AriNote/TIL.docc/SwiftUI.md +++ b/Sources/AriNote/TIL.docc/SwiftUI.md @@ -6,12 +6,4 @@ @TitleHeading("Overview") } -## Overview - -d - -## Topics -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/UIKit.md b/Sources/AriNote/TIL.docc/UIKit.md index 25c091f..f89efcc 100644 --- a/Sources/AriNote/TIL.docc/UIKit.md +++ b/Sources/AriNote/TIL.docc/UIKit.md @@ -2,73 +2,5 @@ 한몸이 되보자... -@Metadata { - @TitleHeading("Overview") -} - -## Topics -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file diff --git a/Sources/AriNote/TIL.docc/UIKit/211123_App_Life_Cycle,_init(frame:),_init(coder:),_frame,_bounds,_IBOutlet_didSet,_updateViewConstraints.md b/Sources/AriNote/TIL.docc/UIKit/211123_App_Life_Cycle,_UIView_init,_frame_vs_bounds,_IBOutlet_didSet,_updateViewConstraints.md similarity index 100% rename from Sources/AriNote/TIL.docc/UIKit/211123_App_Life_Cycle,_init(frame:),_init(coder:),_frame,_bounds,_IBOutlet_didSet,_updateViewConstraints.md rename to Sources/AriNote/TIL.docc/UIKit/211123_App_Life_Cycle,_UIView_init,_frame_vs_bounds,_IBOutlet_didSet,_updateViewConstraints.md diff --git a/Sources/AriNote/TIL.docc/Xcode.md b/Sources/AriNote/TIL.docc/Xcode.md index 523fc28..31acd9b 100644 --- a/Sources/AriNote/TIL.docc/Xcode.md +++ b/Sources/AriNote/TIL.docc/Xcode.md @@ -6,14 +6,4 @@ @TitleHeading("Overview") } -## Overview - -d - -## Topics -- -- -- -- -- -- \ No newline at end of file +## Topics \ No newline at end of file