diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml new file mode 100644 index 0000000..eda9bbe --- /dev/null +++ b/.github/workflows/build_documentation.yml @@ -0,0 +1,41 @@ +name: Build documentation + +on: + pull_request: + types: [opened, reopened, synchronize] + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-docs: + name: Build combined documentation + runs-on: ubuntu-latest + container: + image: swiftlang/swift:nightly-main-jammy + steps: + - uses: actions/checkout@v6 + + - uses: actions/cache@v4 + with: + path: .workspace + key: docs-workspace-${{ hashFiles('scripts/sources.json') }} + restore-keys: | + docs-workspace- + + - name: Install Python + run: apt-get update && apt-get install -y python3 + + - name: Build documentation + run: python3 scripts/build_docs.py --output-dir "$GITHUB_WORKSPACE/build-output" + + - name: Package build output + run: tar -czf "$GITHUB_WORKSPACE/combined-documentation.tar.gz" -C "$GITHUB_WORKSPACE/build-output" . + + - uses: actions/upload-artifact@v4 + with: + name: combined-documentation + path: combined-documentation.tar.gz diff --git a/.gitignore b/.gitignore index dd0fa39..a206102 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ .build .swiftpm Package.resolved +.build-workspace/ +.workspace/ +.build-output/ +**/*.docc/header.html +**/*.docc/footer.html diff --git a/api-guidelines/Sources/APIGuidelines.docc/Documentation.md b/api-guidelines/Sources/APIGuidelines.docc/Documentation.md index 087098b..0461ddc 100644 --- a/api-guidelines/Sources/APIGuidelines.docc/Documentation.md +++ b/api-guidelines/Sources/APIGuidelines.docc/Documentation.md @@ -1 +1,5 @@ # ``APIGuidelines`` + +@Metadata { + @DisplayName("API Guidelines") +} \ No newline at end of file diff --git a/common/footer.html b/common/footer.html index ab918d2..3f71c54 100644 --- a/common/footer.html +++ b/common/footer.html @@ -1,3 +1,12 @@ +