term-kit-backend/.gitea/workflows/docs.yml
david-swift 05dd06af0a
All checks were successful
Deploy Docs / publish (push) Successful in 2m20s
SwiftLint / SwiftLint (push) Successful in 4s
Migrate to Aparoksha Gitea instance
2024-10-14 11:25:51 +02:00

34 lines
1.2 KiB
YAML

name: Deploy Docs
on:
push:
branches: ["main"]
jobs:
publish:
runs-on: david-macbook
steps:
- uses: actions/checkout@v4
- name: Build Docs
run: |
xcrun xcodebuild docbuild \
-scheme TermKitBackend \
-destination 'generic/platform=macOS' \
-derivedDataPath "$PWD/.derivedData" \
-skipPackagePluginValidation
xcrun docc process-archive transform-for-static-hosting \
"$PWD/.derivedData/Build/Products/Debug/TermKitBackend.doccarchive" \
--output-path "docs" \
--hosting-base-path "/"
- name: Modify Docs
run: |
echo "<script>window.location.href += \"/documentation/termkitbackend\"</script><p>Please enable JavaScript to view the documentation <a href='/documentation/termkitbackend'>here</a>.</p>" > docs/index.html;
sed -i '' 's/,2px/,10px/g' docs/css/index.*.css
- name: Upload
uses: wangyucode/sftp-upload-action@v2.0.2
with:
host: 'volans.uberspace.de'
username: 'akforum'
password: ${{ secrets.password }}
localDir: 'docs'
remoteDir: '/var/www/virtual/akforum/term-kit-backend.aparoksha.dev/'