Add new contracts #937
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |