# Deploy an Organization Repository for Free on Vercel

By [Florian Martens](https://pipe0.com/authors/florian-martens) · Published Apr 6, 2025

Source: https://pipe0.com/blog/host-org-repo-on-vercel

> Vercel does not allow hosting organization repositories as part of its free plan. Get around this limitation by mirroring to a private repository.



Vercel has become a popular place to deploy all sorts of applications. One annoying limitation is the inability to deploy
an organization repository as part of the free plan. This limitation seems a bit random since it is not based on any
factors that drive cost for Vercel like traffic or bandwidth.

There is a simple way to get around this limitation, though. You can simply work in your organization repository and
mirror it to a different repository that lives in your private account.

## Configuring repository mirroring with GitHub Actions [#configuring-repository-mirroring-with-github-actions]

<div className="fd-steps">
  <div className="fd-step">
    #### Create a Personal Access Token (PAT) [#1-create-a-personal-access-token-pat]

    * Go to your GitHub account settings
    * Navigate to Developer settings > Personal access tokens
    * Create a fine-grained token
    * Give read and write permission for repository content
    * Give access to the target repository
    * Copy the generated token
  </div>

  <div className="fd-step">
    #### Add the Token as a Secret in Your Organization Repository [#2-add-the-token-as-a-secret-in-your-organization-repository]

    * Go to your organization repository settings
    * Click on "Secrets and variables" > "Actions"
    * Click "New repository secret"
    * Name: PERSONAL\_ACCESS\_TOKEN
    * Value: Paste the token you copied
    * "Add secret"
  </div>

  <div className="fd-step">
    #### Allow GitHub Actions in the Target Repository [#3-allow-github-actions-in-the-target-repository]

    * Go to the target repository
    * Go to "settings" > "Actions" > "General"
    * Scroll to "Workflow permissions"
    * Select "Read and write permissions"

    In the source repo add the following GitHub action file in `.github/workflows/mirror.yaml`:

    Replace yourusername/private-repo.git with your actual private repository path

    ```yaml
    name: Mirror Repository

    on:
      push:
        branches: [main]
      workflow_dispatch: # Allows manual triggering of the workflow

    jobs:
      mirror:
        runs-on: ubuntu-latest
        permissions:
          contents: write
        steps:
          - name: Checkout repository
            uses: actions/checkout@v4
            with:
              fetch-depth: 0 # Fetch all history for all branches and tags
              token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

          - name: Push to private mirror
            run: |
              git remote add private https://github.com/yourusername/private-repo.git
              git push private --force --all
              git push private --force --tags

    ```

    Lastly, change to the source repository and watch it being applied to the target as well.
  </div>
</div>
