-
Notifications
You must be signed in to change notification settings - Fork 204
32 lines (24 loc) · 1.01 KB
/
Copy pathpr-previews.yaml
File metadata and controls
32 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Docs PR Previews
on:
pull_request:
types: [opened, synchronize, reopened, closed]
concurrency:
cancel-in-progress: false
group: 'docs-pr-previews-${{ github.event.pull_request.number }}'
jobs:
trigger-preview:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Trigger preview
run: gh workflow run apify_docs_pr.yml --repo apify/apify-docs-private --field pr-number=${{ github.event.pull_request.number }} --field original-repository=${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
delete-preview:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Delete preview
run: gh workflow run apify_docs_pr.yml --repo apify/apify-docs-private --field pr-number=${{ github.event.pull_request.number }} --field original-repository=${{ github.repository }} --field action=delete
env:
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}