Last active
February 12, 2024 18:26
-
-
Save qutek/fcdc1aad92059c00ad9d7b93049d48dd to your computer and use it in GitHub Desktop.
Revisions
-
qutek revised this gist
Feb 23, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,6 +73,7 @@ Deploy to Production: cat <<EOT >> deploy.txt Commit SHA : ${CI_COMMIT_SHA} From ref : ${CI_COMMIT_REF_NAME} Date : ${CI_JOB_DATE} EOT - rsync -a --progress --human-readable --delete --exclude-from '.gitignore' -
qutek revised this gist
Feb 23, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,6 +81,7 @@ Deploy to Production: . [email protected]:/home/admin/web/demo.lafif.me/public_html/deploy before_script: - export CI_JOB_DATE=$(TZ=Asia/Jakarta date) # Setup SSH deploy keys - 'which ssh-agent || ( apt-get install -qq openssh-client )' - eval $(ssh-agent -s) -
qutek revised this gist
Feb 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,7 +70,7 @@ Deploy to Production: # - ls -a # Write log file - | cat <<EOT >> deploy.txt Commit SHA : ${CI_COMMIT_SHA} From ref : ${CI_COMMIT_REF_NAME} EOT -
qutek created this gist
Feb 23, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,89 @@ # https://gitlab.com/help/ci/quick_start/README # https://docs.gitlab.com/ee/ci/introduction/ # https://docs.gitlab.com/ee/ci/yaml/ image: dpolyakov/docker-node-latest-with-rsync:latest # before_script: # - apt-get update -qq # - apt-get install -qq git ## # STAGES ## stages: # - build # - test - deploy ## # TASKS ## # Build Dependencies: # stage: build # script: # - echo "Building the app" # - node -v # # - (cd mu-plugins/mba-project && npm install) # temporary cd and install # # - gulp --production # # - composer install -d mu-plugins/mba-project # only: # # - staging # - master # Test Codes: # stage: test # script: # - echo "Running tests" # only: # # - staging # - master Deploy to Staging: stage: deploy # when: manual environment: name: staging only: - master script: - echo "Deploy to staging server" before_script: # Setup SSH deploy keys - 'which ssh-agent || ( apt-get install -qq openssh-client )' - eval $(ssh-agent -s) - ssh-add <(echo "$SSH_PRIVATE_KEY") - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' Deploy to Production: stage: deploy when: manual environment: name: production only: - master script: - echo "Deploying ${CI_COMMIT_SHA} from ${CI_COMMIT_REF_NAME} to production server" # - ssh -o PasswordAuthentication=no [email protected] 'exit' || echo "SSH login failed." # - rsync --version # - ls -a # Write log file - | cat <<EOT >> deploy.log Commit SHA : ${CI_COMMIT_SHA} From ref : ${CI_COMMIT_REF_NAME} EOT - rsync -a --progress --human-readable --delete --exclude-from '.gitignore' --exclude .gitignore --exclude .git . [email protected]:/home/admin/web/demo.lafif.me/public_html/deploy before_script: # Setup SSH deploy keys - 'which ssh-agent || ( apt-get install -qq openssh-client )' - eval $(ssh-agent -s) - ssh-add <(echo "$SSH_PRIVATE_KEY") - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'