yangxin 9f96998eb8
Some checks failed
CI-build / build (18.x) (push) Has been cancelled
CI-type-checking / type-check (18.x) (push) Has been cancelled
CI-typos / Spell Check (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
livecode代码开发分支
2025-06-11 21:29:36 +08:00

29 lines
1.5 KiB
Plaintext

# Deploy
The result page (of any number of projects) can be deployed and hosted at [GitHub Pages](https://pages.github.com/) (a free service from GitHub for hosting static websites). This requires login with a [GitHub account](./github-integration.mdx).
The `Deploy` screen can be accessed from the Project menu → Deploy.
import RunInLiveCodes from '../../src/components/RunInLiveCodes.tsx';
<RunInLiveCodes params={{ screen: 'deploy' }} linkText="direct link" />
![LiveCodes Deploy](../../static/img/screenshots/deploy-1.jpg)
The result page (and optionally the source code) is pushed to `gh-pages` branch of a **public** GitHub repo (new or existing). The page, shortly, becomes available on `https://{user}.github.io/{repo}/`.
If an existing repo is selected, the content of the `gh-pages` branch (if existing) is replaced by the deployed content.
If the option `Commit source code` is enabled, the source code will be deployed to the directory `/src`.
The code for the result page (and source code) is deployed as separate files for markup (`/index.html`), styles (`style.css`) and script (`script.js`). This allows re-use of these resources in other projects. Of course, multiple projects can be deloyed and linked to each other to act like a multi-page website.
The LiveCodes app will remember the repo used to deploy each project, so that later updates to the project can be deployed to the same repo.
## Related
- [Export](./export.mdx)
- [Share](./share.mdx)
- [Broadcast](./broadcast.mdx)
- [GitHub integration](./github-integration.mdx)