-
Notifications
You must be signed in to change notification settings - Fork 43
68 lines (66 loc) · 2.67 KB
/
documentation-update.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
65
66
67
68
name: Documentation Update
on:
workflow_call:
push:
branches:
- develop
jobs:
update_docs:
permissions: read-all
runs-on: ubuntu-latest
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 16
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Clean the contracts directory
run: yarn clean
working-directory: packages/contracts/
- name: Generate docs
run: yarn run docgen
working-directory: packages/contracts/
- name: Remove the plugins & token contracts docs
run: rm -rf plugins token
working-directory: packages/contracts/docs/developer-portal/03-reference-guide/
- name: Remove Framework Lifecycle docs
run: rm -rf 04-framework-lifecycle
working-directory: packages/contracts/docs/developer-portal/
- name: Format with prettier
run: yarn run prettier 'packages/contracts/docs/developer-portal/03-reference-guide/**/*.md' --write
- name: Checkout developer-portal
uses: actions/checkout@v4
with:
repository: aragon/developer-portal
ref: staging
path: developer-portal
token: ${{ secrets.ARABOT_PAT }}
- name: Remove the docs/osx/03-reference-guide folder in the developer-portal, excluding index.md
run: |
cd $GITHUB_WORKSPACE/developer-portal/docs/osx/03-reference-guide
shopt -s extglob
rm -rf !(index.md)
- name: Copy the docs/developer-portal/03-reference-guide folder to the developer-portal
run: cp -R packages/contracts/docs/developer-portal/03-reference-guide $GITHUB_WORKSPACE/developer-portal/docs/osx/03-reference-guide
- name: Get short commit hash
id: hash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.ARABOT_PAT }}
path: developer-portal
commit-message: 'Update the Aragon OSx docs by commit ${{ steps.hash.outputs.sha_short }}'
committer: 'Arabot <arabot-1@users.noreply.github.com>'
branch: patch/aragon-osx-docs
delete-branch: true
title: Update the Aragon OSx docs
body: 'Automated update by Github actions (Run: [${{ github.run_id }}](https://github.com/aragon/osx/actions/runs/${{ github.run_id }}))'
reviewers: ${{ github.actor }}
team-reviewers: Ara-Team-OSX