-
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.
Merge pull request #1 from jaesung-0o0/automation/github-pages-publish
Create PUBLISH_DOCUMENTATION.yml
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: 문서 배포 | ||
|
||
on: | ||
# "main" 브랜치에 푸시할 때 마다 워크플로우 작동 | ||
push: | ||
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 "<script>window.location.href += \"/documentation/packagedoccexample\"</script>" > 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 | ||
|
||
|
||
|
||
|