Merge pull request #23 from tuist/renovate/actions-checkout-4.x #2
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
name: Deploy Docs | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
concurrency: | |
group: deploy-docs-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
name: Deploy Documentation | |
runs-on: macos-13 | |
steps: | |
- name: Start deployment | |
uses: bobheadxi/deployments@v1 | |
id: deployment | |
with: | |
env: production | |
step: start | |
- name: Checkout Package | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_$(cat .xcode-version).app | |
- name: Build documentation | |
run: swift package --allow-writing-to-directory ./docs generate-documentation --target SwiftyTailwind --output-path ./docs --transform-for-static-hosting --hosting-base-path / --disable-indexing | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: cc0237353f2f825680b0463629cd4a86 | |
projectName: swiftytailwind-docs | |
directory: docs/ | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
wranglerVersion: '3' | |
- name: Finish deployment | |
uses: bobheadxi/deployments@v1 | |
if: always() | |
with: | |
env: ${{ steps.deployment.outputs.env }} | |
step: finish | |
status: ${{ job.status }} | |
deployment_id: ${{ steps.deployment.outputs.deployment_id }} | |
env_url: "https://swiftytailwind.tuist.io" |