This guide explains how to deploy PersistenceAI to GitHub Pages so users can install it using the install scripts.
- GitHub Repository:
Persistence-AI/Landingmust exist and be accessible - GitHub Pages: Enabled in repository settings (Settings → Pages)
- Build Scripts:
build-distribution.ps1anddeploy-to-github-pages.ps1inPersistencedev/
cd Persistencedev
.\build-distribution.ps1 -Version "1.0.13"This will:
- Build the binary for your platform (or all platforms with
-AllPlatforms) - Create ZIP files in
dist/directory - Verify no source code is included
- Generate SHA256 checksums
Output: dist/persistenceai-{platform}-v{version}.zip
cd Persistencedev
.\deploy-to-github-pages.ps1 -Version "1.0.13"This will:
- Verify ZIP files are secure (no source code)
- Update
website/api/latest.jsonwith the new version - Ensure install scripts are in
website/directory - Verify all required files are present
- Go to https://github.com/Persistence-AI/Landing/releases/new
- Tag:
v1.0.13(must match version exactly) - Title:
PersistenceAI 1.0.13 - Description: Copy from
CHANGELOG.mdor create release notes - Upload Assets:
- Upload all ZIP files from
Persistencedev/dist/ - Upload all
.sha256checksum files
- Upload all ZIP files from
- Publish Release
-
Clone the Landing repository (if not already):
cd .. git clone https://github.com/Persistence-AI/Landing.git cd Landing
-
Copy website files:
# From PersistenceCLI directory Copy-Item -Path "website\*" -Destination "Landing\" -Recurse -Force
-
Commit and push:
git add . git commit -m "Deploy website v1.0.13" git push origin main
-
Enable GitHub Pages (if not already):
- Go to repository Settings → Pages
- Source:
Deploy from a branch - Branch:
main/root - Save
Create .github/workflows/deploy-pages.yml in the Landing repository:
name: Deploy to GitHub Pages
on:
push:
branches:
- main
paths:
- 'website/**'
- '.github/workflows/deploy-pages.yml'
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4- Check website: https://persistence-ai.github.io/Landing/
- Test install scripts:
# Windows iwr -useb https://persistence-ai.github.io/Landing/install.ps1 | iex # Linux/macOS curl -fsSL https://persistence-ai.github.io/Landing/install.sh | bash
- Verify API endpoint: https://persistence-ai.github.io/Landing/api/latest.json
- Check GitHub Release: https://github.com/Persistence-AI/Landing/releases
Once deployed, users can install using:
Windows:
iwr -useb https://persistence-ai.github.io/Landing/install.ps1 | iexLinux/macOS:
curl -fsSL https://persistence-ai.github.io/Landing/install.sh | bashUsers can also download ZIP files directly from GitHub Releases:
The following install methods require additional setup:
- Status: Not yet implemented
- Requires: Publishing to npm registry
- Future:
npm install -g persistenceai
- Status: Not yet implemented
- Requires: Creating Homebrew formula
- Future:
brew install persistenceai
- Status: Not yet implemented
- Requires: Creating Chocolatey package
- Future:
choco install persistenceai
- Status: Not yet implemented
- Requires: Adding to Scoop bucket
- Future:
scoop install persistenceai
- Status: Not yet implemented
- Requires: Creating AUR package
- Future:
paru -S persistenceai-bin
Problem: https://persistence-ai.github.io/Landing/install.ps1 returns 404
Solution:
- Verify files are in
website/directory - Check GitHub Pages is enabled
- Ensure files are committed and pushed to
mainbranch - Wait 1-2 minutes for GitHub Pages to rebuild
Problem: Install script says "version not found"
Solution:
- Verify
website/api/latest.jsonexists and has correct version - Check GitHub Release exists with tag
v{version} - Verify ZIP file name matches:
persistenceai-{platform}-v{version}.zip
Problem: Build script warns about source files
Solution:
- Check
build-distribution.ps1is using explicit file inclusion - Verify
build.tsis cleaning source maps - Manually inspect ZIP contents before uploading
Landing/ (GitHub repository)
├── index.html # Main website
├── install.ps1 # Windows installer
├── install.sh # Unix installer
├── api/
│ └── latest.json # Version API
└── assets/ # Website assets
Before each deployment:
- ZIP files verified (no
.ts,.tsx,.map,src/,node_modules/) - Install scripts updated with correct BASE_URL
-
latest.jsonhas correct version - GitHub Release created with correct tag
- Website files committed and pushed
- Install commands tested on clean system
- Test installation on a clean Windows/Linux/macOS system
- Update website with any additional documentation
- Monitor GitHub Pages deployment status
- Set up automated releases (optional, using GitHub Actions)