-
github/workflows This is the workflows folder automatically created by Github to store all the steps required in Github Actions
-
donations This is the folder to store all the API functions
- serverless.yml Contains the configuration we need for the cloud resources to provision for
- Install Git
- Leave the default options and run through the installer
- Re-open Powershell
- Login to AWS Console
- Create IAM User
- Retrieve IAM User Access Key & Secret Key (https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html)
- NodeJS installed
- npm -g serverless
- Retrieve IAM User Access Key & Secret Key (https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html)
- Install AWS CLI pip module
- Connect with AWS Programmatic Access via
aws configure
command and fill up with the details retrieved above.
- serverless create --template aws-nodejs --path geekout-serverless
- Copy the donations folder and serverless.yml into your newly created folder
- serverless deploy
(if using Windows and running PS scripts for the first time, open Powershell with (Run as Admin) - enter command Set-ExecutionPolicy Unrestricted
)
- serverless invoke -f hello
- curl
- Login to Github, navigate to your repository
- Create Secret for GithubActions (Settings > Secrets)
- Create AWS_ACCESS_KEY_ID && AWS_SECRET_ACCESS_KEY as your secrets in step 2.
- Create workflow (Actions > New Workflow > Nodejs Template)
- Replace the generated yml with geekout-serverless/.github/workflows/ci.yml