Skip to content

docs: add version selection to header #13

docs: add version selection to header

docs: add version selection to header #13

Workflow file for this run

name: Deploy Preview
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
netlify:
runs-on: ubuntu-latest
steps:
- name: Deploy Preview for PR
if: contains(github.event.pull_request.labels.*.name, 'Deploy Preview')
uses: actions-cool/issues-helper@v3
with:
issue-number: ${{ github.event.pull_request.number }}
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🤖 PR Preview Deployment
Deployment in progress
- name: Find comments
id: find_comments
uses: actions-cool/issues-helper@v3
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
comment-auth: 'github-actions[bot]'
body-includes: '🤖 PR Preview Deployment'
- uses: actions/github-script@v7
id: filter-comment
env:
COMMENTS_RESULT: ${{ steps.find_comments.outputs.comments }}
with:
script: |
const { COMMENTS_RESULT } = process.env;
const comments = JSON.parse(COMMENTS_RESULT);
if (comments.length === 1) {
return comments[0].id;
}
return '';
result-encoding: string
- name: Update comment
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.filter-comment.outputs.results }}
body: |
🤖 PR Preview Deployment
Deployment in ready: <URL>