Skip to content

Merge pull request #67 from outfoxx/task/update-libfyaml #24

Merge pull request #67 from outfoxx/task/update-libfyaml

Merge pull request #67 from outfoxx/task/update-libfyaml #24

Workflow file for this run

name: Publish Docs
on:
push:
branches: [ main ]
permissions:
contents: write
concurrency:
group: publish-docs-${{github.ref_name}}
cancel-in-progress: false
jobs:
build:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- run: |
mkdir -p docs
mkdir -p allsgs
mkdir -p sgs
- name: Build Symbol Graph
run: |
swift build -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc allsgs
cp allsgs/Potent*.json sgs
- name: Build Docs
run: >-
swift package
--allow-writing-to-directory docs/${{ github.ref_name }}
generate-documentation
--enable-inherited-docs
--additional-symbol-graph-dir sgs
--target PotentCodables
--output-path docs/${{ github.ref_name }}
--transform-for-static-hosting
--hosting-base-path PotentCodables/${{ github.ref_name }}
- name: Archive Docs
run: tar -czf docs.tar.gz docs
- name: Upload Docs Archive
uses: actions/upload-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: docs.tar.gz
deploy:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Download Docs Archive
uses: actions/download-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: '.'
- name: Unarchive Docs
run: tar -xvf docs.tar.gz
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
clean: false