Skip to content

Commit

Permalink
Update ENVs list in Blockscout docs when new release is published (#2339
Browse files Browse the repository at this point in the history
)

* Update ENVs list in Blockscout docs when new release is published

Fixes #2324

* try to use another workflow

* Update sync-envs-docs.yaml

* change github token

* try to copy both files

* integrate to release workflow

* [skip ci] rename files while copying
  • Loading branch information
tom2drum authored Oct 30, 2024
1 parent cbb42aa commit 8c4a4ad
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/sync-envs-docs.yaml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/sync-envs-docs.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8c4a4ad

Please sign in to comment.