Skip to content

Commit 99c561d

Browse files
committed
ci: split jobs
1 parent ef9f044 commit 99c561d

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
release:
1818
name: release
19-
runs-on: "macos-latest"
19+
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
steps:
2222
- uses: actions/checkout@v6
@@ -96,18 +96,28 @@ jobs:
9696
tag_name: ${{ steps.next-version.outputs.NEXT_VERSION }}
9797
body: ${{ steps.release-notes.outputs.RELEASE_NOTES }}
9898
target_commitish: ${{ steps.auto-commit-action.outputs.commit_hash }}
99+
100+
docc:
101+
name: build and deploy docc
102+
runs-on: macos-latest
103+
needs: release
104+
if: ${{ needs.release.outputs.has-changes == 'true' }}
105+
timeout-minutes: 15
106+
steps:
107+
- uses: actions/checkout@v6
108+
with:
109+
ref: ${{ needs.release.outputs.commit-hash }}
110+
fetch-depth: 0
99111
- name: Build DocC
100112
id: build
101113
uses: space-code/build-docc@main
102-
if: steps.check-changes.outputs.has-changes == 'true'
103114
with:
104115
schemes: '["ValidatorCore", "ValidatorUI"]'
105-
version: ${{ steps.next-version.outputs.NEXT_VERSION }}
116+
version: ${{ needs.release.outputs.next-version }}
106117
- name: Generate Index Page
107118
uses: space-code/generate-index@v1.0.0
108-
if: steps.check-changes.outputs.has-changes == 'true'
109119
with:
110-
version: ${{ steps.next-version.outputs.NEXT_VERSION }}
120+
version: ${{ needs.release.outputs.next-version }}
111121
project-name: 'Validator'
112122
project-description: 'Validator is a modern, lightweight Swift framework that provides elegant and type-safe input validation.'
113123
modules: |
@@ -127,7 +137,6 @@ jobs:
127137
]
128138
- name: Deploy
129139
uses: peaceiris/actions-gh-pages@v4
130-
if: steps.check-changes.outputs.has-changes == 'true'
131140
with:
132141
github_token: ${{ secrets.GITHUB_TOKEN }}
133142
publish_dir: ./docs

0 commit comments

Comments
 (0)