Skip to content

[AUTOMATED] Update: proto/docs/metadata.gen.yaml (#429) #404

[AUTOMATED] Update: proto/docs/metadata.gen.yaml (#429)

[AUTOMATED] Update: proto/docs/metadata.gen.yaml (#429) #404

Workflow file for this run

name: Build Documentation and Push to Build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
steps:
- name: git-checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Install dependencies
run: |
npm install -g pnpm@8.15.4
pnpm install
- name: setup-go
uses: actions/setup-go@v5
with:
go-version: "1.22.5"
- name: Update openapi docs
run: |
# Read the changed files from the previous step
go mod init github.com/0xsequence/docs
go get github.com/mikefarah/yq/v4@latest
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"ApiKeyAuth":[]}]' docs/pages/api/api/rpc.gen.yaml
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"BearerAuth":[]}]' docs/pages/api/analytics/rpc.gen.yaml
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"ApiKeyAuth":[]}]' docs/pages/api/marketplace/rpc.gen.yaml
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"ApiKeyAuth":[]}, {"BearerAuth":[]}]' docs/pages/api/metadata/rpc.gen.yaml
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"ApiKeyAuth":[]}, {"BearerAuth":[]}]' docs/pages/api/indexer/rpc.gen.yaml
go run github.com/mikefarah/yq/v4 -e -i '.security=[{"ApiKeyAuth":[]}]' docs/pages/api/relayer/rpc.gen.yaml
- name: Build
run: pnpm run build
- name: Touch .nojeykll
run: touch ./docs/dist/.nojekyll
- name: Touch CNAME
run: echo "docs.sequence.xyz" > ./docs/dist/CNAME
- name: Copy 404
run: cp 404.html ./docs/dist/404.html
- name: Push
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
GIT_CLONE_PROTECTION_ACTIVE: false
BRANCH: build
FOLDER: ./docs/dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"