Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to Auto update Ghost image on GCP

trigger-build.PNGDear Community,

I am running on Ghost 5.73 fine, I not having any errors, yet I am looking to automate the update process rather than running a script inside the Instance on GCP.
I have checked multiple services on GCP (Cloud Build, Cloud Function…)
Note, That I have connected to a cloned Ghost repo where I created a trigger in Cloud Build based on pushed Tags, attached a reference, yet I am not sure what are the other inputs needed or do I need to rely on Cloud Functions as well

#!/bin/bash

sudo apt update && sudo apt -y
upgrade sudo apt clean && sudo apt autoclean && sudo apt autoremove
sudo npm install -g npm@latest
cd /var/www/ghost
sudo npm install -g ghost-cli@latest sudo
find ./ ! -path “./versions/*” -type f -exec chmod 664 {} ;
ghost backup
ghost stop
ghost update
ghost ls

Appreciate to share some hints or experiences.

Regards,
Ayman

0 0 174
0 REPLIES 0