-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.32 KB
/
retrieve-docs.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
name: Retrieve docs from Contentful
on:
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: yarn
- name: Set up git
run: |
git config --global user.email "${GH_USERNAME}@users.noreply.github.com"
git config --global user.name "${GH_USERNAME}"
env:
GH_USERNAME: ${{ github.actor }}
- name: Retrieve documentation from Contentful
run: |
node index.js
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
- name: Stage changes
run: |
git add .
if: success()
- name: Commit changes
run: |
git commit -m "update documentation files using contentful"
if: success()
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: "Retrieve docs from Contentful"
branch: retrieve-docs-contentful
body: "This PR is generated when running the Retrieve docs from Contentful workflow. It contains the updated documentation files."
labels: "documentation"