generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (61 loc) · 1.96 KB
/
generate-sitemaps.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Regenerate the Sitemaps
on:
repository_dispatch:
types:
- index-published
workflow_dispatch:
jobs:
build-coveo:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: |
echo "Status: ${{ github.event.client_payload.status }}"
echo "Path: ${{ github.event.client_payload.path }}"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Run scripts and commit changes
if: ${{ endsWith(github.event.client_payload.path, 'query-index.json') }}
working-directory: ./coveo
run: |
node generate-coveo-sitemap.js
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update generated coveo.xml file"
repository: coveo
file_pattern: "coveo-xml.xml"
push_options: --force
build-sitemap:
needs: build-coveo
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: |
echo "Status: ${{ github.event.client_payload.status }}"
echo "Path: ${{ github.event.client_payload.path }}"
- name: Configure git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
working-directory: ./tools/sitemap
run: npm install
- name: Run scripts and commit changes
working-directory: ./tools/sitemap
run: |
node create.js
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update generated content-sitemap.xml file"
file_pattern: "content-sitemap.xml"
push_options: --force