Skip to content

Docs improvements (#249) #340

Docs improvements (#249)

Docs improvements (#249) #340

on: [push]
name: Commit preview
jobs:
build-website:
uses: ./.github/workflows/build-website.yaml
publish:
uses: ./.github/workflows/publish-website.yaml
needs: build-website
secrets: inherit
comment-on-commit:
name: Add a comment on the commit
runs-on: ubuntu-latest
needs: publish
permissions:
contents: read
env:
GITHUB_PUBLISH_TOKEN: ${{ secrets.COZY_PAT }}
DEPLOYMENT_URL: ${{ needs.publish.outputs.deployment-url }}
steps:
- name: Comment on the Comment
if: env.GITHUB_PUBLISH_TOKEN != ''
uses: peter-evans/commit-comment@5a6f8285b8f2e8376e41fe1b563db48e6cf78c09 # v3.0.0
with:
token: ${{ env.GITHUB_PUBLISH_TOKEN }}
repository: ${{ github.repository }}
sha: ${{ github.sha }}
body: "See preview on Cloudflare Pages: ${{ env.DEPLOYMENT_URL }}"