2021-06-02 23:55:13 +01:00
|
|
|
static:
|
|
|
|
image: node:alpine
|
|
|
|
stage: build
|
2021-06-03 17:11:36 +01:00
|
|
|
cache:
|
|
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
|
|
paths:
|
|
|
|
- .yarn
|
|
|
|
- .cache
|
2021-06-02 23:55:13 +01:00
|
|
|
before_script:
|
|
|
|
- yarn install --cache-folder .yarn --prefer-offline --production --network-timeout 100000
|
|
|
|
script:
|
2021-06-02 23:58:17 +01:00
|
|
|
- npm run build
|
2021-06-02 23:55:13 +01:00
|
|
|
artifacts:
|
|
|
|
name: '$CI_JOB_ID'
|
|
|
|
paths:
|
|
|
|
- ./public
|
|
|
|
expire_in: 30 mins
|
|
|
|
|
|
|
|
deploy:
|
2021-06-03 08:37:38 +01:00
|
|
|
image: alpine
|
2021-06-02 23:55:13 +01:00
|
|
|
stage: deploy
|
|
|
|
dependencies:
|
|
|
|
- static
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
environment:
|
|
|
|
name: notes
|
|
|
|
url: https://notes.theorangeone.net
|
2021-06-03 08:37:38 +01:00
|
|
|
before_script:
|
|
|
|
- apk add --no-cache rclone
|
2021-06-02 23:55:13 +01:00
|
|
|
script:
|
2021-06-03 08:55:34 +01:00
|
|
|
- export RCLONE_CONFIG_PAGES_PASS=`rclone obscure $RCLONE_WEBDAV_PASSWORD`
|
2021-06-03 08:29:44 +01:00
|
|
|
- rclone sync public/ pages:notes.theorangeone.net/
|
|
|
|
variables:
|
|
|
|
RCLONE_CONFIG_PAGES_TYPE: webdav
|
|
|
|
RCLONE_CONFIG_PAGES_URL: https://pages.theorangeone.net
|
|
|
|
RCLONE_CONFIG_PAGES_USER: github
|