Simplified gitignore #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from https://github.com/fwcd/lighthouse-client-swift/blob/e9f345f1d936c917e520449e379c9c0f00cccbb2/.github/workflows/docs.yml | |
name: Build DocC | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "Sources/SwiftyRedis/**" | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build-docc: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Pages | |
uses: actions/configure-pages@v3.0.6 | |
- name: Set up Swift | |
uses: swift-actions/setup-swift@v1.23.0 | |
with: | |
swift-version: "5.7.1" | |
- name: Generate DocC | |
uses: fwcd/swift-docc-action@v1 | |
with: | |
target: SwiftyRedis | |
output: ./public | |
transform-for-static-hosting: "true" | |
disable-indexing: "true" | |
hosting-base-path: swifty-redis | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1.0.8 | |
with: | |
path: ./public | |
deploy-to-pages: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-docc | |
steps: | |
- name: Deploy DocC to Pages | |
uses: actions/deploy-pages@v1 |