Skip to content

add deploy preview

add deploy preview #1

name: Deploy pr preview
on:
pull_request:
types:
- opened
- synchronize
- closed
jobs:
deploy-pr-preview:
if: github.repository == 'grafana/writers-toolkit'
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
common_secrets: |
PUBLISH_TECHNICAL_DOCUMENTATION_APP_ID=docs-team/publish-technical-documentation:app-id
PUBLISH_TECHNICAL_DOCUMENTATION_PRIVATE_KEY=docs-team/publish-technical-documentation:key
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ env.PUBLISH_TECHNICAL_DOCUMENTATION_APP_ID }}
owner: grafana
private-key: ${{ env.PUBLISH_TECHNICAL_DOCUMENTATION_PRIVATE_KEY }}
repositories: website
- name: clone
shell: bash
run: |
cd ..
git clone https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/grafana/website.git