From ed818aaf2e803198d6046f6a0efa60f31a7af13f Mon Sep 17 00:00:00 2001 From: mariamiah Date: Thu, 8 Oct 2020 10:42:18 +0300 Subject: [PATCH] add deployment documentation --- documentation/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 documentation/README.md diff --git a/documentation/README.md b/documentation/README.md new file mode 100644 index 00000000..8e8e6861 --- /dev/null +++ b/documentation/README.md @@ -0,0 +1,23 @@ +# Spotlights Deployment + +- The spotlights deployment is made via a github actions CI/CD pipeline.This runs the test, build and deployment stages. + +## Github Actions Workflow + +### Test Stage + +- runs for every push and pull request on all branches + +### Build Stage + +- requires the test stage for it to run +- only runs for the master and develop branches +- runs the app build using `npm run build` and bundles specified files into one build folder +- stores the folder as a build artifact and the deploy_script in another deploy_script folder in github actions. +- clears the previous build folder on the server and downloads the build folder and deploy_script folder + +### Deploy stage + +- requires the build stage +- sets the `HOST` and `CMS_URL` environment variables based on the branch. These variables have to be added as github secrets +- unzips the deploy_script folder and executes the script in this folder