61 lines
998 B
Markdown
61 lines
998 B
Markdown
# CI Actions
|
|
|
|
Reusable Forgejo/Gitea actions for toph's infrastructure.
|
|
|
|
## Available Actions
|
|
|
|
### `deploy-site`
|
|
|
|
Deploy a static site to production.
|
|
|
|
**Usage:**
|
|
|
|
```yaml
|
|
name: Deploy
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build site (if needed)
|
|
run: npm run build
|
|
|
|
- name: Deploy
|
|
uses: https://git.toph.so/toph/ci-actions/deploy-site@main
|
|
with:
|
|
site-name: mysite
|
|
source-dir: dist # optional, defaults to current dir
|
|
```
|
|
|
|
**What it does:**
|
|
- Packages your site
|
|
- Uploads to deployment server
|
|
- Triggers Nomad deployment
|
|
- Site becomes available at `https://{site-name}.toph.so`
|
|
|
|
**No configuration needed** - infrastructure handles:
|
|
- Docker images
|
|
- Resource limits
|
|
- Domains & SSL
|
|
- Load balancing
|
|
|
|
## Development
|
|
|
|
To add a new action:
|
|
|
|
```bash
|
|
mkdir -p new-action
|
|
cd new-action
|
|
vim action.yaml
|
|
```
|
|
|
|
Then commit and push to `main`.
|
|
|
|
## License
|
|
|
|
MIT
|