-
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 793 Bytes
/
preview.yml
File metadata and controls
31 lines (25 loc) · 793 Bytes
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
name: Preview Updater
on:
schedule:
- cron: '20 2 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Update Previews
id: preview
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN || env.GITHUB_TOKEN }}
- name: Merge PR
if: steps.preview.outputs.pullRequestNumber != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --merge --delete-branch ${{ steps.preview.outputs.pullRequestNumber }}