Amplication already provides built-in integration with GitHub to push the generated application to a GitHub repository.
When running a local Amplication server you first need to configure the server to integrate with a new GitHub app, following the steps below.
- Go to https://github.com/settings/developers.
- Click on OAuth Apps.
- Click on Register a new application.
- Give the application any name.
- Set the Authorization callback URL URL to http://localhost:3001
In case you are hosting the Amplication server on any other address, use the specific address instead of http://localhost:3001
- Copy and save the client secret and client ID of your new GitHub application.
Go the ../packages/amplication-server/
Add a .env.local file in the root of the server directory
- Add the following content to the file
Replace [client_secret_here] with the client secret of the new GitHub application.
Replace [client_id_here] with the client ID of the new GitHub application.
Restart Amplication server.