Pagesmith.ai
P
  • Features
  • Pricing
  • Blog
  • Documentation
  • Contact
Start Building
Pagesmith.ai
P

From idea to stunning website in minutes. Just describe it, we'll build it.

All rights reserved.

Company
  • About Us
About
  • Blog
  • Contact
Product
  • Documentation
Learn
  • Lovable Alternative
  • Pagesmith vs WordPress
  • SEO for AI Sites
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
English|Suomi
    • GitHub Integration
    • Hosting Options
    • Analytics Setup
  • Glossary
  • Changelog

GitHub Integration

Connect Pagesmith to GitHub. Sync your project, collaborate with version control.

Connect your Pagesmith project to GitHub for version control, collaboration, and CI/CD.

Why Use GitHub?

  • Version control — Full git history of your project
  • Collaboration — Team members can contribute via PRs
  • CI/CD — Deploy with GitHub Actions
  • Backup — Code exists outside Pagesmith
  • Open source — Make your project public

Connecting GitHub

  1. Go to Settings → Integrations
  2. Click Connect GitHub
  3. Authorize Pagesmith
  4. Select or create a repository
  5. Choose sync settings

Sync Options

Push to GitHub

Changes in Pagesmith sync to GitHub:

  • Each publish creates a commit
  • Commit messages describe changes
  • History preserved in git

Pull from GitHub

Changes in GitHub sync to Pagesmith:

  • Pushes to main branch update the project
  • Enable for developer collaboration
  • Pagesmith rebuilds on change

Bidirectional

Both directions enabled:

  • Edit in Pagesmith or your IDE
  • Changes sync both ways
  • Best for active development

Repository Structure

When synced, your GitHub repo contains:

your-repo/
├── src/
│   ├── pages/
│   ├── components/
│   └── layouts/
├── public/
├── astro.config.mjs
├── package.json
├── tailwind.config.mjs
└── README.md

Standard Astro project structure. Clone and run locally with:

npm install
npm run dev

Working with GitHub

Editing in Your IDE

  1. Clone the repository
  2. Make changes locally
  3. Push to main branch
  4. Pagesmith syncs automatically

Using Branches

Create branches for features:

git checkout -b feature/new-section
# Make changes
git push origin feature/new-section
# Create PR in GitHub
# Merge to main
# Pagesmith syncs

Collaborating

  1. Add collaborators in GitHub
  2. They can push or create PRs
  3. Merged changes sync to Pagesmith
  4. Preview in Pagesmith before publishing

CI/CD with GitHub Actions

Deploy to other hosts on push:

# .github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install
      - run: npm run build
      # Add your deployment step

Disconnecting GitHub

  1. Go to Settings → Integrations
  2. Click Disconnect GitHub
  3. Your code remains in both places
  4. No further syncing

Troubleshooting

Sync Conflicts

If changes happen in both places:

  • Pagesmith will show a conflict warning
  • Review changes before resolving
  • Choose which version to keep

Authorization Issues

If sync stops working:

  1. Check GitHub authorization in settings
  2. Re-authorize if needed
  3. Verify repository still exists

Large Files

Git has file size limits:

  • Images should be compressed
  • Avoid committing node_modules
  • Use Git LFS for large assets if needed

Related Docs

  • Export — Download code without GitHub
  • Hosting Options — Deploy elsewhere
  • Version History — Built-in history
  1. Why Use GitHub?
    1. Connecting GitHub
    2. Sync Options
    3. Repository Structure
    4. Working with GitHub
    5. CI/CD with GitHub Actions
    6. Disconnecting GitHub
    7. Troubleshooting
    8. Related Docs