From 9fca0808c268df37750180d98891192336a6872b Mon Sep 17 00:00:00 2001 From: Jaesung Date: Tue, 17 Oct 2023 05:16:52 +0900 Subject: [PATCH] Create PUBLISH_DOCUMENTATION.yml --- .github/workflows/PUBLISH_DOCUMENTATION.yml | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/PUBLISH_DOCUMENTATION.yml diff --git a/.github/workflows/PUBLISH_DOCUMENTATION.yml b/.github/workflows/PUBLISH_DOCUMENTATION.yml new file mode 100644 index 0000000..41d89b4 --- /dev/null +++ b/.github/workflows/PUBLISH_DOCUMENTATION.yml @@ -0,0 +1,49 @@ +name: 문서 배포 + +on: + # "main" 브랜치를 베이스로 하는 PR 에서 워크플로우 작동 + pull_request: + branches: [ "main" ] + +# GitHub Pages 에 배포하기 위한 GITHUB_TOKEN 권한 설정 +permissions: + contents: read + pages: write + id-token: write +# 동시성 배포 허용 +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + # GitHub Pages 로 배포하기 위한 필수 설정 + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: macos-13 #최신버전 + steps: + - name: 체크아웃 🛎️ + uses: actions/checkout@v3 + - name: DocC 문서 빌드 + run: | + xcodebuild docbuild -scheme PackageDocCExample \ + -derivedDataPath /tmp/docbuild \ + -destination 'generic/platform=iOS'; + $(xcrun --find docc) process-archive \ + transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/PackageDocCExample.doccarchive \ + --hosting-base-path package-docc-example \ + --output-path docs; + echo "" > docs/index.html + - name: artifact 업로드 + uses: actions/upload-pages-artifact@v1 + with: + # docs 경로에 있는 것만 업로드 + path: 'docs' + - name: GitHub Pages 에 배포 + id: deployment + uses: actions/deploy-pages@v1 + + + +