kind: pipeline name: hugo build and deploy type: docker platform: os: linux arch: arm64 trigger: branch: - main steps: - name: git pull submodules image: alpine/git settings: user: from_secret: GIT_USER password: from_secret: GIT_PASSWORD commands: - git submodule update --init --recursive - name: build hugo site image: plugins/hugo settings: hugo_version: 0.109.0 # theme: ameida-cv extended: true validate: true # config: config.toml # content: data output: ./public commands: - apk add libc6-compat libstdc++ - /bin/hugo - name: deploy on server image: greglebreton/drone-rsync:aarch64 settings: hosts: ["192.168.1.100"] target: /var/www/html/hugo-cv source: public/* port: from_secret: RSYNC_PORT user: from_secret: RSYNC_USER key: from_secret: RSYNC_SSH_KEY - name: web CV to PDF image: python commands: - python3 -m pip install weasyprint - python3 web-to-pdf.py - name: deploy cv on terminal-cv image: greglebreton/drone-rsync:aarch64 settings: hosts: ["192.168.1.101"] target: /workspace/terminal-cv/site/resources/resume.pdf source: ./out.pdf port: 2021 user: from_secret: RSYNC_USER key: from_secret: RSYNC_STACK_KEY - name: notify image: greglebreton/drone-email:arm64 settings: from.address: greg.lebreton@hotmail.com host: smtp-mail.outlook.com port: 587 debug: true username: greg.lebreton@hotmail.com password: from_secret: MAIL_PASSWORD recipients: [ greg.lebreton@hotmail.com ] subject: > [{{ build.status }}] {{ repo.owner }}/{{ repo.name }} body: > 📝 {{repo.name}} / {{commit.branch}} - {{commit.message}}
{{#success build.status}} ✅ succeeded for 👷‍♂️ build {{build.number}} {{else}} 🛑 failed for 👷‍♂️ build {{build.number}} {{/success}}
when: status: [ success, failure ]