A Ghost theme for my personal blog
sass -t compressed assets/css/styles.scss assets/css/styles.css
This theme uses GitHub Actions to:
- Compile SCSS files to CSS
- Deploy changes to a staging branch (
pr-pages
) - Automatically deploy to the production server
Follow this guide: Installing Ghost 1.0 without Ghost CLI
For migrating to Ghost 1.0.0, follow: Migration Guide
Validated for 4.X using GScan
src-pages
: Source branch containing SCSS filespr-pages
: Automated build branch with compiled CSSassets/css
: Contains both source SCSS and compiled CSS filespartials
: Theme template partialsstatic
: Static theme assets
Changes to the src-pages
branch automatically trigger the build and deployment workflow.
If you need to deploy manually, follow the workflow steps in the GitHub Actions file.
Run these commands from your home directory:
# Download and extract latest Ghost version
curl -LOk https://ghost.org/zip/ghost-latest.zip
unzip ghost-latest.zip -d ghost-temp
# Remove old files
sudo rm -rf /opt/ghost/core
sudo rm /opt/ghost/index.js
sudo rm /opt/ghost/*.json
sudo rm /opt/ghost/*.md
# Copy new files
sudo cp -R ~/ghost-temp/core /opt/ghost/
sudo cp -R ~/ghost-temp/index.js /opt/ghost/
sudo cp -R ~/ghost-temp/package.json /opt/ghost/
sudo cp -R ~/ghost-temp/npm-shrinkwrap.json /opt/ghost/
sudo cp -R ~/ghost-temp/*.md /opt/ghost/
sudo chown -R ghost:ghost /opt/ghost
# Install dependencies and set permissions
sudo npm install --production
sudo chown -R ghost:ghost /opt/ghost
# Restart service
service nginx restart
If npm install
fails, try upgrading npm:
sudo npm install -g npm
- If CSS changes aren't visible, check if the workflow completed successfully
- For deployment issues, verify SSH credentials and server configuration