diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cd127d1589d..8d2314a1510 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,25 +37,25 @@ jobs: git checkout . git checkout gh-pages - name: Modify versions.json - run: | - import json - new_content = {'version': '3.5.0-sc', 'title': '3.5.0-sc', 'aliases': []} - - try: - with open('./versions.json', 'r') as f: - data = json.load(f) - - # Remove the version from the list - data = [item for item in data if item.get('version') != new_content['version']] - - # If you want to add it back to the end, uncomment the next line - # data.append(new_content) - - with open('./versions.json', 'w') as outfile: - json.dump(data, outfile, indent=2) - except Exception as e: - print(f"An error occurred: {e}") - exit(1) + run: | + import json + new_content = {'version': '3.5.0-sc', 'title': '3.5.0-sc', 'aliases': []} + + try: + with open('./versions.json', 'r') as f: + data = json.load(f) + + # Remove the version from the list + data = [item for item in data if item.get('version') != new_content['version']] + + # If you want to add it back to the end, uncomment the next line + # data.append(new_content) + + with open('./versions.json', 'w') as outfile: + json.dump(data, outfile, indent=2) + except Exception as e: + print(f"An error occurred: {e}") + exit(1) shell: python # not public this branch; but push to web service