Skip to content

2503 doc autogen

2503 doc autogen #14

name: Update Markdown
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
update-md:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build avalanche-cli
run: |
chmod +x ./scripts/build.sh
./scripts/build.sh
- name: Add avalanche to PATH
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install --upgrade pip
# If you need additional dependencies, install them here
# pip install -r requirements.txt
- name: Generate MD
run: |
python .github/scripts/cli_scraper.py
- name: Commit changes
run: |
git config user.name "github-actions" ;
git config user.email "[email protected]" ;
if [ -n "$(git status --porcelain)" ]; then
git add . ;
git commit -m "chore: Update MD file [skip ci]" ;
git push origin HEAD:${{ github.head_ref }} ;
else
echo "No changes to commit." ;
fi