-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (44 loc) · 2 KB
/
update-autodoc.yml
File metadata and controls
52 lines (44 loc) · 2 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: update autodoc
on:
schedule:
- cron: "0 6 * * 01" # every monday at 6 am (UTC)
workflow_dispatch:
jobs:
sync-autodoc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: download autodoc markdowns
run: |
destination=content/en/documentation/autodoc
wget https://raw.githubusercontent.com/eclipse-edc/Connector/refs/heads/gh-pages/autodoc/autodoc.md -O ${destination}/connector.md
wget https://raw.githubusercontent.com/eclipse-edc/IdentityHub/refs/heads/gh-pages/autodoc/autodoc.md -O ${destination}/identity-hub.md
wget https://raw.githubusercontent.com/eclipse-edc/FederatedCatalog/refs/heads/gh-pages/autodoc/autodoc.md -O ${destination}/federated-catalog.md
sed -i "1s;^;---\n title: Connector\n weight: 10\n---\n\n;" ${destination}/connector.md
sed -i "1s;^;---\n title: Identity-Hub\n weight: 20\n---\n\n;" ${destination}/identity-hub.md
sed -i "1s;^;---\n title: Federated-Catalog\n weight: 30\n---\n\n;" ${destination}/federated-catalog.md
- run: |
git config user.name "eclipse-edc-bot"
git config user.email "edc-bot@eclipse.org"
git checkout -b update-autodoc
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "docs: update autodoc markdowns"
git push origin update-autodoc
else
echo "No changes detected. Skipping commit and PR creation."
echo "no_changes=true" >> $GITHUB_ENV
fi
- name: Create pull request
if: env.no_changes != 'true'
uses: thomaseizinger/create-pull-request@1.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: update-autodoc
base: main
title: "docs: update autodoc"
reviewers: ${{ github.actor }}
body: |-
This PR updates autodoc to the latest released versions.