lyt outputs pure static files to ./dist/. Any static host can serve them.
lyt build
This creates:
dist/
├── index.html
├── about.html
├── blog/
│ └── post-name/
│ └── index.html
├── base.css
├── tokens.css
└── sitemap.xml
lyt
Deploy your static site to any hosting provider.
lyt outputs pure static files to ./dist/. Any static host can serve them.
lyt build
This creates:
dist/
├── index.html
├── about.html
├── blog/
│ └── post-name/
│ └── index.html
├── base.css
├── tokens.css
└── sitemap.xml
Build on GitHub, deploy to Netlify:
.github/workflows/netlify.yml:name: Deploy to Netlify
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
run: |
cd engine
go run . build
- name: Deploy
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: './dist'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID secrets in GitHubBuild on GitHub, deploy to Vercel:
.github/workflows/vercel.yml:name: Deploy to Vercel
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
run: |
cd engine
go run . build
- name: Deploy
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID }}
vercel-project-id: ${{ secrets.PROJECT_ID }}
vercel-args: '--prod'
Build on GitHub, deploy to Cloudflare:
.github/workflows/cloudflare.yml:name: Deploy to Cloudflare
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
run: |
cd engine
go run . build
- name: Deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: your-project
directory: dist
Create .github/workflows/deploy.yml:
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
run: |
cd engine
go build -o lyt .
cd ..
./engine/lyt build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
Build locally or in CI, then rsync:
cd engine && go run . build
rsync -avz --delete dist/ user@vps:/var/www/yoursite/
Or use SSH in CI:
- name: Deploy
run: |
rsync -avz --delete dist/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/site/
Upload dist/ to S3/Cloudflare R2/Backblaze, then connect CDN.
AWS S3 example:
aws s3 sync dist/ s3://your-bucket --delete
Then configure your CDN to point to the bucket.
For per-environment config (e.g., different URLs), use shell variables:
# In your CI
export SITE_URL="https://staging.example.com"
cd engine && go run . build
Reference in templates via build-time substitution if needed.
Questions? Check the docs or open an issue on GitHub.