-
Notifications
You must be signed in to change notification settings - Fork 34
/
config.yml
70 lines (62 loc) · 1.58 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
# https://circleci.com/docs/2.0/configuration-reference
version: 2.1
workflows:
main:
jobs:
- lint
- build
- deploy:
filters:
branches:
only: main
requires:
- lint
- build
jobs:
lint:
docker:
- image: cimg/base:stable
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt install yamllint
- run: yamllint -c .yamllintrc .
build:
docker:
- image: cimg/ruby:2.7
steps:
- checkout
- restore_cache:
key: FOSSRIT-people-ruby-{{ checksum "Gemfile.lock" }}
- run: bundle install
- save_cache:
key: FOSSRIT-people-ruby-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- restore_cache:
key: FOSSRIT-people-htmlproofer-{{ checksum "Gemfile.lock" }}
- run: bundle exec rake test
- save_cache:
key: FOSSRIT-people-htmlproofer-{{ checksum "Gemfile.lock" }}
paths:
- tmp/.htmlproofer
- persist_to_workspace:
root: _site
paths:
- ./*
deploy:
docker:
- image: cibuilds/base:latest
steps:
# deploy.sh dependencies
- run: apk add rsync
# clone repo (required to access `.circleci/deploy.sh`)
- run: git clone https://github.com/FOSSRIT/people.git
# checkout generated html
- attach_workspace:
at: _site
# deploy to production
- deploy:
name: Deploy to GitHub Pages
command: ./people/.circleci/deploy.sh