aws-amplify / aws-amplify/amplify-hosting
[Question] Automate environment push and remove
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
**Which Category is your question related to?**
Environments and teams workflow.
**Amplify CLI Version**
4.21.0
**What AWS Services are you utilizing?**
Auth, Api, Storage, Hosting, Function, AppSync
**Question**
Suppose I have the following workflow.
A github repo with a `master`, `develop` and `feature` branches.
Developers can only merge to the `develop` and `master` branches through pull requests.
According to the docs to provision the backend from one environment to another one must:
1. `git clone`
2. `amplify init`
3. `git checkout feature`
4. `amplify env checkout feature`
5. `amplify pull`
6. `git checkout develop`
7. `amplify env checkout develop`
8. `git merge feature`
9. `amplify push`
My question is, is there a way to automate this from a pull request? So a developer works on a feature on his own sandbox, he then creates a pull request and after the pull request is accepted and merged all of the steps above are automated. Maybe not all but those pertinent to merging a `feature` to `develop`.
Or will an admin have to perform all those steps above after a pull request is accepted?
Also, any way to remove an amplify environment automatically after a pull request has been merged and the branch deleted?
Just a note, I've set up Pull Request Previews and Continuous Deployment on AppSync.
Contributor guide
Assessment
This issue has not been assessed yet.