A while ago I wrote detailed tutorial on how to deploy Serverless applications using Github Actions.
The deployment process consists of several sequential steps:
npm run productioncommand;
build_productionbranch to local repository;
gh-pagesbranch on remote repository;
You may see entire deployment script on the gist below:
A few other notes:
CNAMEfile containing your domain name;
To allow deployment script push
build_production to remote
gh-pages branch, you need to go to your Github Settings → Personal Access Tokens and create a new token. Then you need to add this token to repository's
Secrets. Then, you can access that token in deployment script as variable stored under
secrets keyword, for example:
Feel free to modify this deployment script as needed.