Skip to content

Commit

Permalink
Adds workflow that builds documentation (#350)
Browse files Browse the repository at this point in the history
* Create build_documentation.yml

* Update build_and_test.yml

* Update build_documentation.yml

* Update build_example_project.yml

* Update codeql.yml

* Update deploy_documentation.yml

* Update swiftlint.yml

* Update deploy_documentation.yml

* Update build_documentation.yml
  • Loading branch information
simonbs authored Feb 23, 2024
1 parent 3f5834c commit b8f5546
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 14 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check for changed files
uses: dorny/paths-filter@v3
id: changes
Expand All @@ -41,7 +39,7 @@ jobs:
- name: Build
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail\
set -o pipefail &&\
xcodebuild build-for-testing\
-scheme Runestone\
-sdk iphonesimulator\
Expand All @@ -50,7 +48,7 @@ jobs:
- name: Test
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail\
set -o pipefail &&\
xcodebuild test-without-building\
-scheme Runestone\
-sdk iphonesimulator\
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Documentation
on:
workflow_dispatch: {}
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Documentation
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for changed files
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- '.github/workflows/build_documentation.yml'
- 'Sources/**'
- name: Build Documentation
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail &&\
xcodebuild docbuild\
-scheme Runestone\
-destination 'generic/platform=iOS'\
-derivedDataPath ../DerivedData\
| xcbeautify --renderer github-actions
4 changes: 1 addition & 3 deletions .github/workflows/build_example_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check for changed files
uses: dorny/paths-filter@v3
id: changes
Expand All @@ -40,7 +38,7 @@ jobs:
- name: Build
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail\
set -o pipefail &&\
xcodebuild build\
-project Example/Example.xcodeproj\
-scheme Example\
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check for changed files
uses: dorny/paths-filter@v3
id: changes
Expand All @@ -45,7 +43,7 @@ jobs:
- name: Build
if: steps.changes.outputs.src == 'true'
run: |
set -o pipefail\
set -o pipefail &&\
xcodebuild\
-scheme Runestone\
-sdk iphonesimulator\
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ concurrency:
cancel-in-progress: true
jobs:
build:
name: Build Documentation
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build Documentation
run: |
set -o pipefail &&\
xcodebuild docbuild\
-scheme Runestone\
-destination 'generic/platform=iOS'\
-derivedDataPath ../DerivedData
-derivedDataPath ../DerivedData\
| xcbeautify --renderer github-actions
- name: Process Archive
run: |
mkdir _site
Expand All @@ -48,6 +49,7 @@ jobs:
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
deploy:
name: Deploy Documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Run SwiftLint
uses: norio-nomura/[email protected]
with:
Expand Down

0 comments on commit b8f5546

Please sign in to comment.