.gitlab-ci.yml 1.03 KB
Newer Older
1
2
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html
3
4

variables:
5
  JAVA_HOME: "/opt/jdk-12"
6
7
8
  EXPORT_PAGES_DIR: "/opt/tomcat9/webapps/ROOT/"

pages-master:    
9
  stage: deploy
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  script:
    - echo $EXPORT_PAGES_DIR
    - mkdir .public
    - cp -r css .public
    - cp -r images .public
    - cp -r js .public
    - cp -r includes .public
    - cp *.html .public
    - mv .public public
    - cp -r public/* "$EXPORT_PAGES_DIR"
  artifacts:
    paths:
      - public
  only:
    - master
25

26
27
pages-devel:    
  stage: deploy
28
29
30
31
32
33
34
35
36
  script:
    - echo $EXPORT_PAGES_DIR
    - mkdir .public
    - cp -r css .public
    - cp -r images .public
    - cp -r js .public
    - cp -r includes .public
    - cp *.html .public
    - mv .public public
37
    - cd public
38
    - /opt/jdk-12/bin/jar -cvf ROOT.war *
39
    - curl --upload-file ROOT.war -u tomcat:$TOMCATPASS "http://193.196.52.30:8085/manager/text/deploy?path=/ROOT&update=true"
40
41
42
43
44
  artifacts:
    paths:
      - public
  only:
    - devel