-
Notifications
You must be signed in to change notification settings - Fork 20
42 lines (40 loc) · 1.19 KB
/
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
name: "docs"
on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Checkout Docs Repository
uses: actions/checkout@v3
with:
repository: dl-solarity/docs
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
path: docs
- name: Generate and Copy Docs
run: |
npx hardhat markup --outdir markups
rm -rf markups/contracts/mock
rm -rf markups/contracts/interfaces
rm -rf docs/docs/reference/contracts
mkdir -p docs/docs/reference
cp -r markups/contracts docs/docs/reference
- name: Push Docs
run: |
git config —-global user.name "Docs Syncer"
git config —-global user.email "[email protected]"
git fetch --unshallow
latest_tag=$(git describe --tags --abbrev=0)
cd docs
git add -f .
if ! git diff-index --quiet HEAD; then
git commit -m "CI: \`$latest_tag\`"
git push
fi