Welcome to mirror list, hosted at ThFree Co, Russian Federation.

config.yml « .circleci - github.com/eddiewebb/hugo-resume.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9ae8c79c8d72fee1ecd43b3d501a82eaeb49d6d (plain)
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
version: 2.1

workflows:
  build-deploy:
    jobs:
      - test

jobs:
  test:
    docker:
      - image: felicianotech/docker-hugo:0.47.1
    working_directory: hugo-resume
    steps:
      - checkout
      - run:
          name: HUGO build for Test domain
          command: |
            hugo -v -s exampleSite --destination /tmp/public -b http://localhost --themesDir ../..
            ls /tmp/public
            if [ ! -f /tmp/public/index.html ];then
              echo "index.html not created, failing"
              exit 1
            fi
      - run:
          name: Start Local Server
          background: true
          command: |
            hugo server -v -s exampleSite -b http://localhost --themesDir ../..
      - run:
          name: Check Server  
          command: |
            sleep 5 #wait for last background step to complete
            HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" http://localhost:1313`
            if [ "$HTTPCODE" -ne 200 ];then
              echo "index not found, failing"
              exit 1
            fi
      - run:
          name: Check Content  
          command: |
            curl -s -o /tmp/index  http://localhost:1313
            #just some keywords that confirm content was read into template..
            grep 'Rochester' /tmp/index 
            grep 'fab fa-stack-overflow' /tmp/index 
            grep 'Eddie Webb' /tmp/index 
            grep 'BOSH (Bosh Outer SHell)' /tmp/index