ci: Merge SwiftLint and DocC workflows into single CI pipeline

Three jobs in one workflow:
1. lint — SwiftLint via Homebrew (runs on push + PR)
2. build-docs — DocC generation (runs after lint, push to main only)
3. deploy — GitHub Pages deployment (runs after build-docs)

Removes the separate docc.yml and swiftlint.yml workflows.
This commit is contained in:
phranck
2026-01-30 16:02:13 +01:00
parent 254085b2ff
commit 6c80949914
2 changed files with 23 additions and 24 deletions
@@ -1,8 +1,10 @@
name: Build and Deploy DocC
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
@@ -15,8 +17,25 @@ concurrency:
cancel-in-progress: true
jobs:
build:
lint:
name: SwiftLint
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint
build-docs:
name: Build DocC
needs: lint
runs-on: macos-15
# Only build and deploy docs on push to main (not on PRs)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -81,7 +100,8 @@ jobs:
path: docs-output
deploy:
needs: build
name: Deploy to GitHub Pages
needs: build-docs
runs-on: ubuntu-latest
environment:
name: github-pages
-21
View File
@@ -1,21 +0,0 @@
name: SwiftLint
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
lint:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint