Spaces:
Runtime error
Runtime error
Ray Chen commited on
Commit ·
22ed5bf
1
Parent(s): 2e621ff
change: only deploy when main branch pushed
Browse filesFiles changed (4)
3 unmodified lines456789103 unmodified linesUserName = Literal["default"]SPACE_CONFIG: Dict[UserName, Config] = {"default": {"space_name": "example","space_owner": "jy-raychen",3 unmodified lines456789103 unmodified linesUserName = Literal["default"]PRODUCTION_SPACE_CONFIG: Dict[UserName, Config] = {"default": {"space_name": "example","space_owner": "jy-raychen",
1 unmodified line234567825 unmodified lines343536373839401 unmodified lineimport subprocessimport sysfrom config import SPACE_CONFIGfrom model import Space25 unmodified linesparser.add_argument("--user_token", required=True)args = parser.parse_args()space = Space(SPACE_CONFIG["default"])push_result = force_push_to_remote(space, args.username, args.user_token, args.branch_name1 unmodified line234567825 unmodified lines34353637383940411 unmodified lineimport subprocessimport sysfrom config import PRODUCTION_SPACE_CONFIGfrom model import Space25 unmodified linesparser.add_argument("--user_token", required=True)args = parser.parse_args()# TODO: Use different space config when deploy to dev environment.space = Space(PRODUCTION_SPACE_CONFIG["default"])push_result = force_push_to_remote(space, args.username, args.user_token, args.branch_name
12345615 unmodified lines22232425262728import sysfrom config import SPACE_CONFIGfrom model import ReadMe, SpaceDEFAULT_USER = "jy-raychen"15 unmodified linesif __name__ == "__main__":space = Space(SPACE_CONFIG["default"])readme = readme_template(space.readme)print(readme)12345615 unmodified lines22232425262728import sysfrom config import PRODUCTION_SPACE_CONFIGfrom model import ReadMe, SpaceDEFAULT_USER = "jy-raychen"15 unmodified linesif __name__ == "__main__":space = Space(PRODUCTION_SPACE_CONFIG["default"])readme = readme_template(space.readme)print(readme)
12345678910name: Deploy Spacerun-name: Deploy to spaceon:push:branches:- '**'concurrency:group: ${{ github.workflow }}-${{ github.ref_name }}12345678910name: Deploy Productionrun-name: Deploy to production spaceon:push:branches:- 'main'concurrency:group: ${{ github.workflow }}-${{ github.ref_name }}
.github/tools/config.py+1-1
.github/tools/deploy_to_space.py+3-2
.github/tools/generate_readme.py+2-2
.github/workflows/deploy-to-space.yaml → .github/workflows/deploy-to-production.yamlRenamed+3-3