-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (43 loc) · 1.51 KB
/
main.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
name: Add new contracts
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
get-contracts:
runs-on: ubuntu-latest
steps:
# Checkout the branch
- name: checkout
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.5.1
- name: get contracts
run: |
yarn
yarn start
- name: commit main
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: add new contracts
branch: main
file_pattern: contracts *.txt
- name: Set Git config
run: |
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
- name: Checkout docs
run: |
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/docs*:refs/remotes/origin/docs* +refs/tags/docs*:refs/tags/docs*
git checkout --progress --force -b docs refs/remotes/origin/docs
- name: Merge master back to dev
run: |
git merge --no-ff origin/main -m "Auto-merge main to docs" --allow-unrelated-histories -s recursive -Xtheirs
- name: Write gitignore
run: |
sed -i "s,docs,docs/public,g" .gitignore
- name: Commit docs
run: |
git add .
git commit -m "add new documentation" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
git push origin docs