Skip to content

docs: add a documentation #23

docs: add a documentation

docs: add a documentation #23

Workflow file for this run

name: Deploy DocC Documentation
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
inputs:
version:
description: 'Documentation version'
required: false
default: latest'
permissions:
contents: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Get Version
id: version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="latest"
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Building documentation for version: $VERSION"
- name: Build DocC
id: build
uses: ./.github/actions/build-docc
with:
schemes: '["ValidatorCore", "ValidatorUI"]'
version: ${{ steps.version.outputs.version }}
- name: Generate Index Page
uses: ./.github/actions/generate-index
with:
version: ${{ steps.build.outputs.version }}
project-name: "Validator"
project-description: "Swift validation framework"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs