Skip to content

new web search updates #17

new web search updates

new web search updates #17

Workflow file for this run

name: Docs
on:
push:
tags: ['*']
branches: [main]
jobs:
build:
runs-on: macos-latest
steps:
- uses: swift-actions/setup-swift@v2
- uses: actions/checkout@v4
- name: Restore .build
id: restore-build
uses: actions/cache/restore@v4
with:
path: .build
restore-keys: "swiftpm-docs-build-${{ runner.os }}-"
key: "swiftpm-docs-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
- name: Generate documentation
run: |
swift package --allow-writing-to-directory ./ResponsesAPI.doccarchive generate-documentation --target ResponsesAPI --disable-indexing --experimental-documentation-coverage --diagnostic-filter error --output-path ./ResponsesAPI.doccarchive
tar -cf ResponsesAPI.doccarchive.tar ./ResponsesAPI.doccarchive/data ./ResponsesAPI.doccarchive/index ./ResponsesAPI.doccarchive/metadata.json ./ResponsesAPI.doccarchive/documentation-coverage.json
- name: Cache .build
if: steps.restore-build.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: .build
key: "swiftpm-docs-build-${{ runner.os }}-${{ github.event.pull_request.base.sha || github.event.after }}"
- name: Update latest documentation
id: github-pages
if: github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: github-pages
if-no-files-found: error
path: ./ResponsesAPI.doccarchive.tar
- name: Attach to release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: ./ResponsesAPI.doccarchive.tar
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4