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 lines4567789103 unmodified lines
UserName = Literal["default"]
SPACE_CONFIG: Dict[UserName, Config] = {PRODUCTION_SPACE_CONFIG: Dict[UserName, Config] = { "default": { "space_name": "example", "space_owner": "jy-raychen",1 unmodified line2345567825 unmodified lines3435363737383940411 unmodified lineimport subprocessimport sys
from config import SPACE_CONFIGfrom config import PRODUCTION_SPACE_CONFIGfrom model import Space
25 unmodified lines parser.add_argument("--user_token", required=True) args = parser.parse_args()
# TODO: Use different space config when deploy to dev environment. space = Space(SPACE_CONFIG["default"]) space = Space(PRODUCTION_SPACE_CONFIG["default"])
push_result = force_push_to_remote( space, args.username, args.user_token, args.branch_name123345615 unmodified lines2223242525262728import sys
from config import SPACE_CONFIGfrom config import PRODUCTION_SPACE_CONFIGfrom model import ReadMe, Space
DEFAULT_USER = "jy-raychen"15 unmodified lines
if __name__ == "__main__": space = Space(SPACE_CONFIG["default"]) space = Space(PRODUCTION_SPACE_CONFIG["default"])
readme = readme_template(space.readme) print(readme)12123456778910name: Deploy Spacerun-name: Deploy to spacename: Deploy Productionrun-name: Deploy to production space
on: 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