Skip to content

Commit

Permalink
Fix Documentation Deployment (#79)
Browse files Browse the repository at this point in the history
# Fix Documentation Deployment

## ⚙️ Release Notes 
- Fix Documentation Deployment
- Utilize Reusable GitHub Action


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored May 18, 2024
1 parent 3368091 commit fafb5c6
Showing 1 changed file with 12 additions and 41 deletions.
53 changes: 12 additions & 41 deletions .github/workflows/documentation-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,21 @@ on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploydocs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
xcodebuild -version
swift --version
echo "env.selfhosted: ${{ env.selfhosted }}"
- name: Build DocC
run: |
xcodebuild docbuild -scheme TemplateApplication \
-derivedDataPath .derivedData \
-destination 'generic/platform=iOS' \
-skipPackagePluginValidation \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO
$(xcrun --find docc) process-archive \
transform-for-static-hosting .derivedData/Build/Products/Debug-iphoneos/TemplateApplication.doccarchive \
--hosting-base-path SpeziTemplateApplication \
--output-path .docs
echo "<script>window.location.href += \"/documentation/templateapplication\"</script>" > .docs/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
docs:
name: Documentation Deployment
uses: StanfordBDHG/.github/.github/workflows/docc-github-pages.yml@v2
permissions:
contents: read
pages: write
id-token: write
with:
scheme: 'TemplateApplication'
dryrun: ${{ github.ref != 'main' }}

0 comments on commit fafb5c6

Please sign in to comment.