This guide covers setting up the complete Rax CLI infrastructure including the apt repository.
- Go to repository Settings > Actions
- Enable "Allow all actions and reusable workflows"
- Go to repository Settings > Pages
- Source: Deploy from a branch
- Branch: Select
gh-pages(will be created by workflow) - Folder:
/(root) - Click Save
- Go to repository Settings > Environments
- Create new environment:
github-pages - Optionally add deployment protection rules
# Tag the release
git tag -a v0.1.0 -m "Rax CLI v0.1.0"
# Push the tag
git push origin v0.1.0Once the tag is pushed:
- CI Workflow runs tests and builds
- Release Workflow creates GitHub release with artifacts
- Deploy Workflow deploys apt repository to GitHub Pages
If you prefer manual setup:
./build-deb.sh./update-repo.sh# Create gh-pages branch if it doesn't exist
git checkout --orphan gh-pages
git reset --hard
# Copy repo contents
cp -r repo/* .
rm -rf repo
# Commit and push
git add .
git commit -m "Deploy apt repository"
git push -u origin gh-pagesAfter setup, users can install with:
# Add repository key
curl -fsSL https://raxcore-dev.github.io/rax-offline-cli/repo.key | \
sudo gpg --dearmor -o /usr/share/keyrings/rax-archive-keyring.gpg
# Add repository
echo "deb [signed-by=/usr/share/keyrings/rax-archive-keyring.gpg] https://raxcore-dev.github.io/rax-offline-cli/ /" | \
sudo tee /etc/apt/sources.list.d/rax.list
# Install
sudo apt update
sudo apt install raxgpg --full-generate-key
# Key type: RSA and RSA
# Key size: 4096
# Expiration: 2y
# Name: Rax CLI Repository
# Email: your-email@example.comgpg --armor --export your-email@example.com > repo/repo.keycd repo
gpg --absolute-key-id <KEY_ID> --sign -o Release.gpg Release
gpg --absolute-key-id <KEY_ID> --clearsign -o InRelease Release# Export private key (store securely, never commit to git)
gpg --armor --export-secret-keys your-email@example.com > rax-repo-key.private
# Store in secure location
# DO NOT commit this file to git!The workflows use these default variables:
GITHUB_TOKEN: Automatically providedsecrets.GITHUB_TOKEN: For release creation
No additional secrets need to be configured for basic setup.
- Check Actions tab for any errors
- Ensure Actions are enabled in Settings
- Verify the tag format is
v*(e.g., v0.1.0)
- Check the gh-pages branch exists
- Verify Pages source is set correctly
- Check the Deploy workflow logs
- Verify repo.key is accessible:
curl -I https://raxcore-dev.github.io/rax-offline-cli/repo.key - Check Packages file exists:
curl -I https://raxcore-dev.github.io/rax-offline-cli/dists/stable/main/binary-amd64/Packages.gz - Ensure the repository URL ends with
/
# Update version in Cargo.toml
# Commit changes
git tag -a v0.2.0 -m "Rax CLI v0.2.0"
git push origin v0.2.0# When key expires, generate new one
# Update repo/repo.key
# Commit and push
git add repo/repo.key
git commit -m "Update repository signing key"
git push- Never commit GPG private keys to the repository
- Rotate keys before expiration
- Use protected branches for main and gh-pages
- Enable branch protection rules
- Review workflow permissions regularly
For issues or questions: