Deploy a docker-compose container

I have a simple ubuntu system with docker-compose on it.
Today I am deploying like that:

ssh to-machine
git clone my-repo
cd /my-repo
docker-compose build -f docker-compose.yml
typeorm migration:run //npm cli
docker-compose up -d

My server is located on google cloud platform under “compute engine”.
Can this be totally automated with GitHub actions?
Do I need to also automate the ssh command and keep my passwords on github?


Thanks for your feedback.
There is an example workflow that uses GitHub Actions to deploy a container to an existing Google Compute Engine (GCE) instance. You will likely need to change or update values to match your setup. Please refer to this document for detailed steps. According to document, the service account key which will be used for authentication. This key should be created in Google Cloud and stored as a secret in Github Action.