Skip to content

Update docs.yml

Update docs.yml #7

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.2.2
- name: Set up Pages
uses: actions/configure-pages@v5.0.0
- name: Set up Swift
uses: swift-actions/setup-swift@v2.2.0
with:
swift-version: '6.0.0'
- name: Generate Docs
run: |
swift package --allow-writing-to-directory ./docs \
generate-documentation --target "UserDocumentation" \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path "wallpaper-player-mac" \
--output-path ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.1
with:
path: ./docs
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: docs
steps:
- name: Deploy Docs
uses: actions/deploy-pages@v4.0.5