From bdda8d42caafa844fea0493ff72de0f9fb07153f Mon Sep 17 00:00:00 2001 From: Will Winder Date: Fri, 21 Jul 2023 15:05:17 -0400 Subject: [PATCH] Remove the docs-pr release process. (#126) --- .github/workflows/docs-pr.yml | 84 -------------------------------- .github/workflows/goreleaser.yml | 6 --- 2 files changed, 90 deletions(-) delete mode 100644 .github/workflows/docs-pr.yml diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml deleted file mode 100644 index df0a1623..00000000 --- a/.github/workflows/docs-pr.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: "Doc Repo PR Generator" - -on: - workflow_dispatch: - workflow_call: - -jobs: - docs-pr: - runs-on: ubuntu-latest - steps: - - name: Install python for doc scripts - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Clone conduit repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - path: conduit - - name: Clone docs repo - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - fetch-depth: 0 - repository: algorand/docs - ref: staging - path: docs - - name: Install golang - uses: actions/setup-go@v3 - with: - go-version-file: 'conduit/go.mod' - - name: Generate and install docs - run: | - cd conduit - make - cd .. - # Regenerate CLI documentation - ./docs/scripts/reformat.py -doc-dir docs/docs/clis/conduit/ -cmd conduit/cmd/conduit/conduit - # Update hand-written documentation - rm -rf docs/docs/get-details/conduit/ - cp -r conduit/docs docs/docs/get-details/conduit - - # Copy the plugin docs using this ChatGPT special. - # Set the directory to search - search_dir="conduit/conduit/plugins" - target_base_dir=docs/docs/get-details/conduit/plugins - - # Loop through each README.md file found - find "$search_dir" -name "README.md" | while read readme_file; do - # Get the directory path of the README file - dir_path=$(dirname "$readme_file") - - # Get the path relative to search_dir - relative_path=${dir_path#$search_dir/} - - # Remove the last directory name from relative_path - output_dir=${relative_path%/*} - - # Create the output directory path - output_dir="$target_base_dir/$output_dir" - - # Create the output file path - output_file="$output_dir/$(basename "$dir_path" .md).md" - - # Create the output directory if it doesn't exist - mkdir -p "$output_dir" - - # Copy the README file to the output file path - cp "$readme_file" "$output_file" - done - - # TODO: check if there are any changes before creating a PR? - - name: Create algorand/docs Pull Request - uses: peter-evans/create-pull-request@v4 - with: - path: docs - author: algo-dev-service - branch: "conduit-automated-pr" - title: "Conduit Documentation Update" - body: "Regenerate CLI documentation and update hand written documentation." - reviewers: "nullun,barnjamin,ryanrfox" - delete-branch: true - base: staging - token: ${{ secrets.PAT }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index d5d167a7..12faa2f2 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -43,9 +43,3 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # After a release, generate a PR to publish docs. - publish-docs-trigger: - name: Trigger a PR to update documentation. - needs: goreleaser - uses: ./.github/workflows/docs-pr.yml