cv/.woodpecker/build.yaml
Nikolai Rodionov f4bbc1e5fa
Generate CV per a commit
In order to have different CV versions, I've decided to publish each CV
with a commit SHA in the name. They should be put in the ./n.rodionov
directory. Once the change is merged to the main, it should be copied to
the root directory of a bucket without a hash in the name
2024-04-23 12:30:15 +02:00

48 lines
1.5 KiB
YAML

---
when:
event: push
steps:
build:
name: Build the CV
image: node
environment:
OUTPUT: /tmp/out
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
- npm install
- npm run build
- mkdir $CI_WORKSPACE/cv
- mv index.pdf $CI_WORKSPACE/cv/n.rodionov.$CI_COMMIT_SHA.pdf
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 badhouseplants-minio:/public-download/n.rodionov
release:
when:
branch: main
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 badhouseplants-minio:/public-download/n.rodionov/n.rodionov.$CI_COMMIT_SHA.pdf badhouseplants-minio:/public-download/n.rodionov.pdf