Skip to content

Commit

Permalink
chore: added generate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Oct 7, 2024
1 parent 60a7d13 commit 2915566
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Injective Docs Generation

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout injective-docs
uses: actions/checkout@v1
with:
repository: InjectiveLabs/injective-docs
ref: dev
path: ./injective-docs

- name: Generate new docs from injective-core
run: |
cd injective-docs
export GH_CORE_USER=${{ secrets.GH_CORE_USER }}
export GH_CORE_TOKEN=${{ secrets.GH_CORE_TOKEN }}
./scripts/setup.sh
- name: Checkout injective-docs
uses: actions/checkout@v1
with:
repository: InjectiveLabs/injective-docs
ref: dev
path: ./injective-docs

- name: Commit the changes to injective-docs
run: |
cd injective-docs
git add .
git commit -m "chore: docs regenerated"
git push
7 changes: 6 additions & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ rm -rf $INJECTIVE_DIR
mkdir $CORE_DIR
mkdir $INJECTIVE_DIR

git clone https://github.com/InjectiveLabs/injective-core.git $BUILD_DIR/injective-core -b $injective_core_branch --depth 1 --single-branch > /dev/null
if [ -f "$GH_CORE_USER" ] && [ -f "$GH_CORE_TOKEN" ]; then
git clone https://$GH_CORE_USER:$GH_CORE_TOKEN@github.com/InjectiveLabs/injective-core.git $BUILD_DIR/injective-core -b $injective_core_branch --depth 1 --single-branch > /dev/null
else
git clone https://github.com/InjectiveLabs/injective-core.git $BUILD_DIR/injective-core -b $injective_core_branch --depth 1 --single-branch > /dev/null
fi

git clone https://github.com/InjectiveLabs/cosmos-sdk.git $BUILD_DIR/cosmos-sdk -b $cosmos_sdk_branch --depth 1 --single-branch > /dev/null

for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
Expand Down

0 comments on commit 2915566

Please sign in to comment.