website/.gitlab-ci.yml

44 lines
706 B
YAML

default:
image: node:latest
tags:
- node
stages:
- build
- deploy
build:
stage: build
artifacts:
paths:
- build/
script:
- npm install
- npm run build
deploy-beta:
stage: deploy
before_script:
- apt-get update
- apt-get install ncftp
script:
- ncftpput -R -u "$ftp_user" -p "$ftp_pass" pls5618.com beta_site build/*
environment:
name: beta
url: http://beta.pls5618.com
only:
- beta
deploy:
stage: deploy
before_script:
- apt-get update
- apt-get install ncftp
script:
- ncftpput -R -u "$ftp_user" -p "$ftp_pass" pls5618.com . build/*
environment:
name: website
url: http://pls5618.com
only:
- main