Created scripts for automatic deployment
This commit is contained in:
27
.gitlab-ci.yml
Normal file
27
.gitlab-ci.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// FTP auto-deploy
|
||||||
|
// instructions here: https://is.gd/D84vXz
|
||||||
|
image: ruby:2.4.1
|
||||||
|
stages:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- apt-get update -qq && apt-get install -y -qq libcurl4-openssl-dev lftp
|
||||||
|
- bundle install
|
||||||
|
- gem install jekyll
|
||||||
|
- gem install jekyll-theme-minima
|
||||||
|
|
||||||
|
deploy_script:
|
||||||
|
stage: deploy
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
environment:
|
||||||
|
name: website
|
||||||
|
url: https://cmci.colorado.edu/cmci
|
||||||
|
script:
|
||||||
|
- echo "Building.."
|
||||||
|
- chmod +x ./_scripts/build.sh
|
||||||
|
- ./_scripts/build.sh
|
||||||
|
- echo "Deploying.."
|
||||||
|
- chmod +x ./_scripts/deploy_website.sh
|
||||||
|
- ./_scripts/deploy_website.sh
|
||||||
|
|
3
_scripts/build.sh
Normal file
3
_scripts/build.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bundle exec jekyll build --config _config.yml
|
4
_scripts/deploy_website.sh
Normal file
4
_scripts/deploy_website.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "Uploading"
|
||||||
|
cd _site || exit
|
||||||
|
lftp -p 21 -u $CU_USR,$CU_PASSWORD $CU_HOSTNAME -e "set ftp:ssl-allow no; mirror -R . $CU_DIR; bye"
|
Reference in New Issue
Block a user