Question
App connected to GitLab doesn't pull latest commit on deployment
I have a DO App that is deploying a static site connected to GitLab. If I manually trigger a deployment it doesn’t pull the latest commit. It appears to be pulling the commit that was used for the initial deployment when I created the App. Is there anyway to clear the build cache and force it to pull the latest commit?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
To clarify I have “Autodeploy code changes” turned off. I am going to use
doctl apps create-deployment
to deploy changes from a GitLab CI job so that I can run other jobs (lint, test, etc) before deploying. But when I rundoctl apps create-deployment
DO App Platform doesn’t use the latest commit. Same thing happens if I click the “Deploy” button in the UI.To clarify further (I couldn’t edit my comment) the command I am using is
doctl apps create-deployment <app_id> --force-rebuild -t <access_token>