Skip to content

Commit e6b081e

Browse files
committed
Added Gitlab ci jobs.
1 parent b7d6140 commit e6b081e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.gitlab-ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
image: ruby:2.3.3
2+
3+
variables:
4+
NOKOGIRI_USE_SYSTEM_LIBRARIES: "true"
5+
6+
stages:
7+
- build
8+
- deploy
9+
10+
# Only run on master branch and branches matching /1.(.*)/ pattern
11+
workflow:
12+
rules:
13+
- if: '$CI_COMMIT_BRANCH == "master"'
14+
- if: '$CI_COMMIT_BRANCH =~ /^1\..*/'
15+
16+
cache:
17+
paths:
18+
- vendor/ruby
19+
20+
before_script:
21+
- bundle install --path vendor/ruby
22+
23+
build:
24+
stage: build
25+
script:
26+
- bundle exec jekyll build
27+
artifacts:
28+
paths:
29+
- _site
30+
expire_in: 1 hour
31+
32+
deploy:
33+
stage: deploy
34+
image: python:3.9
35+
before_script:
36+
- pip install awscli
37+
script:
38+
- aws s3 sync _site/ s3://www.frobiovox.com --delete --acl public-read --region us-west-1
39+
only:
40+
- master
41+
environment:
42+
name: production
43+
url: http://www.frobiovox.com
44+
dependencies:
45+
- build

0 commit comments

Comments
 (0)