generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 79
41 lines (36 loc) · 1.05 KB
/
preview.yaml
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
33
34
35
36
37
38
39
40
41
name: Preview changed docs
on:
pull_request:
branches:
- main
jobs:
preview:
runs-on: ubuntu-latest
name: Preview changed-files
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v35
with:
json: true
json_raw_format: true
files: docs
- name: Show preview if any file(s) in the docs folder change
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: actions/github-script@v6
with:
script: |
const { default: previewChanges } = await import('${{ github.workspace }}/bin/preview-changes.js')
await previewChanges({
github,
context,
glob,
changes: ${{ steps.changed-files-specific.outputs.all_modified_files }}
});