mirror of
https://github.com/RealOrangeOne/notes.git
synced 2024-11-16 21:59:03 +00:00
37 lines
856 B
YAML
37 lines
856 B
YAML
static:
|
|
image: node:alpine
|
|
stage: build
|
|
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- .yarn
|
|
- .cache
|
|
before_script:
|
|
- yarn install --cache-folder .yarn --prefer-offline --production --network-timeout 100000
|
|
script:
|
|
- npm run build
|
|
artifacts:
|
|
name: '$CI_JOB_ID'
|
|
paths:
|
|
- ./public
|
|
expire_in: 30 mins
|
|
|
|
deploy:
|
|
image: alpine
|
|
stage: deploy
|
|
dependencies:
|
|
- static
|
|
only:
|
|
- master
|
|
environment:
|
|
name: notes
|
|
url: https://notes.theorangeone.net
|
|
before_script:
|
|
- apk add --no-cache rclone
|
|
script:
|
|
- export RCLONE_CONFIG_PAGES_PASS=`rclone obscure $RCLONE_WEBDAV_PASSWORD`
|
|
- 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
|