cv/.woodpecker/build.yaml

60 lines
1.6 KiB
YAML
Raw Normal View History

2024-02-21 11:03:09 +00:00
---
when:
event: push
variables:
- &s3_path 'badhouseplants-minio:/public-download/n.rodionov'
2024-02-21 11:03:09 +00:00
steps:
build:
name: Build the CV
image: node
environment:
OUTPUT: /tmp/out
2024-04-23 10:51:17 +00:00
backend_options:
kubernetes:
securityContext:
privileged: true
2024-02-21 11:03:09 +00:00
commands:
- apt-get update
- |-
apt-get install -y libx11-xcb1 libxcomposite1 libasound2 \
libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 \
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 \
libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
libnss3-dev
2024-02-25 12:20:36 +00:00
- npm install
- npm run build
2024-02-21 11:03:09 +00:00
- mkdir $CI_WORKSPACE/cv
- mv index.pdf $CI_WORKSPACE/cv/n.rodionov.$CI_COMMIT_SHA.pdf
2024-02-21 11:04:33 +00:00
2024-02-21 11:03:09 +00:00
upload:
name: Upload the CV
image: rclone/rclone:latest
secrets:
- rclone_config_content
environment:
RCLONE_CONFIG: /tmp/rclone.conf
commands:
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
- |-
rclone copy -P $CI_WORKSPACE/cv *s3_path
release:
2024-02-21 11:04:33 +00:00
when:
branch: main
2024-04-23 10:40:16 +00:00
name: Upload the official version
2024-02-21 11:03:09 +00:00
image: rclone/rclone:latest
secrets:
- rclone_config_content
environment:
RCLONE_CONFIG: /tmp/rclone.conf
commands:
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
- |-
rclone copyto \
*s3_path/n.rodionov.$CI_COMMIT_SHA.pdf \
*s3_path.pdf