Create automated deployment pipelines for your projects with GitHub Actions. Follow these simple steps to set up continuous deployment.
Your Project ID is your Pushly subdomain
Paste your Pushly dashboard URL or subdomain. We'll automatically extract the Project ID. For example: focus-flow.wareality.tech or focus-flow.
Create an access token via the authentication API
Configure your repository secrets for automated deployments
⚠️ Complete previous steps: Please complete Steps 1 and 2 to see the secret values here.
PROJECT_IDPUSHLY_TOKEN💡 Tip: Copy the Key name and Value separately. In GitHub Secrets, use the Key as the secret name and paste the Value as the secret value. Both must be added exactly as shown above.
Generate your GitHub Actions workflow file
name: Pushly Auto Deploy (PRODUCTION)
on:
push:
branches:
- main
jobs:
deploy-production:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Trigger Deployment Creation
id: create_deployment
run: |
echo "🚀 Creating deployment record on Pushly..."
RESPONSE=$(curl -s -X POST "https://api.wareality.tech/api/projects/${{ secrets.PROJECT_ID }}/deployments" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.PUSHLY_TOKEN }}" \
-d "{
\"gitCommitHash\": \"${{ github.sha }}\",
\"gitBranch\": \"main\",
\"environment\": \"PRODUCTION\"
}")
echo "Response: $RESPONSE"
DEPLOYMENT_ID=$(echo $RESPONSE | jq -r '.id')
if [ "$DEPLOYMENT_ID" = "null" ] || [ -z "$DEPLOYMENT_ID" ]; then
echo "❌ Failed to create deployment"
exit 1
fi
echo "✅ Deployment created with ID: $DEPLOYMENT_ID"
echo "deployment_id=$DEPLOYMENT_ID" >> $GITHUB_ENV
- name: Trigger Actual Deployment
run: |
echo "🚀 Starting deployment to PRODUCTION environment..."
curl -s -X POST "https://api.wareality.tech/api/projects/${{ secrets.PROJECT_ID }}/deployments/${{ env.deployment_id }}/deploy?environment=PRODUCTION" \
-H "Authorization: Bearer ${{ secrets.PUSHLY_TOKEN }}"
echo "✅ Deployment triggered to PRODUCTION!"
- name: Done
run: echo "🎉 Pushly Deployment to PRODUCTION initiated successfully!"📝 Next Steps: Save this file as .github/workflows/pushly-deploy-production.yml in your repository root. Make sure you've completed Steps 1-3 before using this workflow!
Need help? Check out our documentation or contact support.