diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df2c0433b1..7485ee7c82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,6 +81,12 @@ jobs: with: platforms: linux/amd64,linux/arm64/v8 + sync_envs_docs: + name: Sync ENV variables docs + uses: './.github/workflows/sync-envs-docs.yml' + needs: publish_image + secrets: inherit + # Temporary disable this step because it is broken # There is an issue with building web3modal deps upload_source_maps: diff --git a/.github/workflows/sync-envs-docs.yaml b/.github/workflows/sync-envs-docs.yaml deleted file mode 100644 index 9c3c68a046..0000000000 --- a/.github/workflows/sync-envs-docs.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync ENV variables docs - -on: - workflow_dispatch: - -jobs: - run: - name: Run - runs-on: ubuntu-latest - steps: - - name: Copy files to Blockscout Docs repository - uses: lubu12/copy-files-to-repository@v1 - env: - API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }} - with: - source-files: 'docs/ENVS.md docs/DEPRECATED_ENVS.md' - destination-username: 'blockscout-bot' - destination-repository: 'blockscout/docs' - destination-directory: 'docs/setup/env-variables/frontend-common-envs' - commit-email: 'tom@blockscout.com' diff --git a/.github/workflows/sync-envs-docs.yml b/.github/workflows/sync-envs-docs.yml new file mode 100644 index 0000000000..4e034dd9eb --- /dev/null +++ b/.github/workflows/sync-envs-docs.yml @@ -0,0 +1,40 @@ +name: Sync ENV variables docs + +on: + workflow_dispatch: + +jobs: + run: + name: Run + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Copy main ENV file to Blockscout Docs repository + uses: dmnemec/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.GITHIB_BOT_TOKEN }} + with: + source_file: 'docs/ENVS.md' + destination_repo: 'blockscout/docs' + destination_folder: 'setup/env-variables/frontend-common-envs' + rename: 'envs.md' + destination_branch: 'master' + user_email: 'bot@blockscout.com' + user_name: 'blockscout-bot' + use_rsync: true + + - name: Copy deprecated ENV file to Blockscout Docs repository + uses: dmnemec/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.GITHIB_BOT_TOKEN }} + with: + source_file: 'docs/DEPRECATED_ENVS.md' + destination_repo: 'blockscout/docs' + destination_folder: 'setup/env-variables/frontend-common-envs' + rename: 'deprecated-envs.md' + destination_branch: 'master' + user_email: 'bot@blockscout.com' + user_name: 'blockscout-bot' + use_rsync: true