9c7739f14f
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
39 lines
1.5 KiB
YAML
39 lines
1.5 KiB
YAML
name: Deploy documentation PR preview
|
|
|
|
on:
|
|
# Privilege escalation necessary to publish to Netlify
|
|
# 🚨 We must not execute any checked out code here.
|
|
workflow_run: # zizmor: ignore[dangerous-triggers]
|
|
workflows: ["Static Analysis"]
|
|
types:
|
|
- completed
|
|
permissions: {}
|
|
jobs:
|
|
netlify:
|
|
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
actions: read
|
|
deployments: write
|
|
steps:
|
|
- name: 📥 Download artifact
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
name: docs
|
|
path: docs
|
|
|
|
- name: 📤 Deploy to Netlify
|
|
uses: matrix-org/netlify-pr-preview@9805cd123fc9a7e421e35340a05e1ebc5dee46b5 # v3
|
|
with:
|
|
path: docs
|
|
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
branch: ${{ github.event.workflow_run.head_branch }}
|
|
revision: ${{ github.event.workflow_run.head_sha }}
|
|
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
site_id: ${{ secrets.NETLIFY_SITE_ID }}
|
|
desc: Documentation preview
|
|
deployment_env: PR Documentation Preview
|
|
environment: PR Documentation Preview
|