Now, we are ready to make our first deployment. You can Git push a new change to master to trigger it.Go back to your project root and run the following.
$ npm version patch
This is simply updating the NPM version for your project. It is a good way to keep track of the changes you are making to your project. And it also creates a quick Git commit for us.Push the change using.
$ git push
Remember this pushes the code to your fork of the repository. Create now a pull request on the original repository, approve the pull request and follow the deployment (in the original repository not your fork) actions > workflow-name and the run.
Now if you head into the workflow in Github, you should see a build in progress. Now to see the build logs, you can click on the workflow.
Once the build is complete, take a look at the build log and make a note of the following:
- Cognito User Pool Id:
- Cognito App Client Id:
- Cognito Identity Pool Id:
- S3 File Uploads Bucket:
- API Gateway URL:
We'll be needing these later in our frontend and when we test our APIs.
Now head over to the app home page. You'll notice that the build was directly promoted to production.
We will in the a next step define two pipelines that allow us to build and deploy the pull request first and another one that deletes this after the merge to master.
Next let's configure our serverless API with a custom domain.