Skip to content

Merge pull request #8 from ViewFeature/fix/swiftlint-modifier-order #14

Merge pull request #8 from ViewFeature/fix/swiftlint-modifier-order

Merge pull request #8 from ViewFeature/fix/swiftlint-modifier-order #14

Workflow file for this run

name: Documentation
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show Swift version
run: swift --version
- name: Build Documentation
run: |
swift package --allow-writing-to-directory ./docs \
generate-documentation \
--target Flow \
--output-path ./docs \
--transform-for-static-hosting \
--hosting-base-path Flow
- name: Fix root index.html redirect
run: |
cat > ./docs/index.html << 'EOF'
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=/Flow/documentation/flow/">
<link rel="canonical" href="/Flow/documentation/flow/">
<title>Redirecting to Flow Documentation</title>
<script>
window.location.href = "/Flow/documentation/flow/";
</script>
</head>
<body>
<p>If you are not redirected automatically, please <a href="/Flow/documentation/flow/">click here</a>.</p>
</body>
</html>
EOF
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4