Skip to content

Build all  platforms #191

Build all  platforms

Build all  platforms #191

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Build all  platforms
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: 0 0 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
generate_and_deploy_docs:
name: Build Documentation
runs-on: ${{ matrix.macos }}
strategy:
fail-fast: false
matrix:
xcode: ['latest']
macos: ['macos-14']
scheme: ['Taskr']
command: ['docbuild']
platform: ['macOS'] # ADD 'iOS', 'tvOS', 'watchOS'
steps:
- name: Switch xcode to ${{ matrix.xcode }}
uses: maxim-lobanov/[email protected]
with:
xcode-version: ${{ matrix.xcode }}
- name: Double-check macOS version (${{ matrix.macos }})
run: sw_vers
- name: Code Checkout
uses: actions/checkout@v2
- name: Check xcodebuild version
run: xcodebuild -version
- name: Check xcode embedded SDKs
run: xcodebuild -showsdks
- name: Show buildable schemes
run: xcodebuild -list
- name: Show eligible build destinations for ${{ matrix.scheme }}
run: xcodebuild -showdestinations -scheme ${{ matrix.scheme }}
- name: Skip Macro Validation
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Generate DocC Documentation
run: |
xcodebuild docbuild -scheme Taskr -destination generic/platform=macOS -derivedDataPath ./build
doccarchive_path=$(find ./build -name '*.doccarchive' -print -quit)
if [ -z "$doccarchive_path" ]; then
echo "No .doccarchive file found."
exit 1
fi
- name: Convert DocC Archive to Static Website
uses: fwcd/swift-docc-action@v1
with:
inputs: "${{ steps.generate_docs.outputs.doccarchive_path }}"
output: "./docs"
base-url: "taskr"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: false