24 lines
701 B
YAML
24 lines
701 B
YAML
|
default:
|
||
|
image: node:latest
|
||
|
cache:
|
||
|
key: ${CI_COMMIT_REF_SLUG}
|
||
|
paths:
|
||
|
- node_modules/
|
||
|
- .npm/
|
||
|
|
||
|
stages: # List of stages for jobs, and their order of execution
|
||
|
- build
|
||
|
- deploy
|
||
|
|
||
|
build-job: # This job runs in the build stage, which runs first.
|
||
|
stage: build
|
||
|
script:
|
||
|
- npm install
|
||
|
- npm run build
|
||
|
|
||
|
deploy-job: # This job runs in the deploy stage.
|
||
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||
|
script:
|
||
|
- apt-get update -qq && apt-get install -y -qq lftp
|
||
|
- lftp -c "open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./build ./www --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
|