diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index afa5a22145597e659d752388fe49d11dfafef069..21cdb820904a73b489d77134ad3101aaa765feef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,3 +31,12 @@ deploy_dev: - deploy_dev script: - echo "deploying dev" + - apt update + - apt install -y curl gnupg + - curl -sL https://deb.nodesource.com/setup_8.x | bash - + - apt update + - apt install -y nodejs + - rm ./package-lock.json + - npm install + - ./node_modules/@angular/cli/bin/ng build --prod --base-href=/sv2/ + - bash ./install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000000000000000000000000000000000000..6c7c24503a81498967268f03c8a9d265f5f6a5f0 --- /dev/null +++ b/install.sh @@ -0,0 +1,4 @@ +mkdir -p /var/www/sv2/dist/sv2 +cp sv2.conf /etc/nginx/snippets +cp -r dist/* /var/www/sv2/dist/sv2 +echo "you must include /etc/nginx/snippets/sv2.conf in your nginx site config manually" diff --git a/sv2.conf b/sv2.conf new file mode 100644 index 0000000000000000000000000000000000000000..1ceaba3057dcf7e57454a34f3fe5cfd47df84d8d --- /dev/null +++ b/sv2.conf @@ -0,0 +1,5 @@ +location ~ /sv2.* { + root /var/www/sv2/dist/; + #alias /var/www/sv2/dist/sv2/; + try_files $uri$args $uri$args/ $uri/ /sv2/index.html; +}