34 lines
1.2 KiB
YAML
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/' |