Skip to content

Instantly share code, notes, and snippets.

View i-bm's full-sized avatar
🏠
Working from home

Isaac Boakye-Manu i-bm

🏠
Working from home
View GitHub Profile
@i-bm
i-bm / .gitlab-ci.yml
Created March 15, 2023 08:10 — forked from antoninbouchal/.gitlab-ci.yml
Deploy APP through SSH to VPS with Gitlab CI
stages:
- build
- deploy
before_script:
- |
# docker variables for name and tag of new image
export DOCKER_TAG="${CI_COMMIT_SHA:0:8}"
export DOCKER_REPO="$CI_REGISTRY_IMAGE"
export DOCKER_IMAGE="${DOCKER_REPO}:${DOCKER_TAG}"
@i-bm
i-bm / post-receive.sh
Created July 12, 2022 17:22 — forked from benfrain/post-receive.sh
post-receive hook for multiple branches
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch
echo 'Changes pushed live.'
fi
@i-bm
i-bm / how_to.md
Created September 4, 2020 19:47 — forked from oanhnn/how_to.md
How to fix composer error "Content-Length Mismatch"

First, run:

$ composer config --list --global        //this will get the composer home path.
[home] /root/.composer                   //it's my composer home path.

And then, edit the config.json in [home] directory, make it like this:

{
  "config": {
 "github-protocols": [
@i-bm
i-bm / deployment_guide.md
Created August 20, 2020 11:30 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel