fyp-report/.drone.yml

97 lines
2.5 KiB
YAML
Raw Normal View History

2023-10-16 14:48:04 +01:00
---
kind: pipeline
type: exec
name: Build and deploy
steps:
- name: Linting
commands:
- bash linting.sh
- name: Build UPDS-1
commands:
- cd upds-1
- pdflatex UPDS12-1.tex
# Prepare bib
- /usr/bin/vendor_perl/biber UPDS12-1
# Compile twice for the table of contents and for bib text
- pdflatex UPDS12-1.tex
- cd -
- name: Build UPDS-2
commands:
- cd upds-2
- pdflatex UPDS12-2.tex
# Prepare bib
- /usr/bin/vendor_perl/biber UPDS12-2
# Compile twice for the table of contents and for bib text
- pdflatex UPDS12-2.tex
- cd -
- name: Build Report
commands:
- cd report
- cp ../upds-1/UPDS-content.tex UPDS-1-content.tex
- cp ../upds-2/UPDS-content.tex UPDS-2-content.tex
- pdflatex report.tex
# Prepare bib
- /usr/bin/vendor_perl/biber report
# Compile twice for the table of contents and for bib text
- pdflatex report.tex
- cd -
- name: Build Poster
commands:
- cd poster
- echo -e "\n\n\nFirst 1\n\n\n"
- pdflatex poster.tex || cat poster.log
# Prepare bib
- echo -e "\n\n\nFirst 2\n\n\n"
- /usr/bin/vendor_perl/biber poster
# Compile twice for the table of contents and for bib text
- echo -e "\n\n\nFirst 3\n\n\n"
- pdflatex poster.tex
- cd -
- name: Generate text
commands:
- pnpm i
- pnpm ts-node main.ts report/report.tex
- name: gitea_release
environment:
TOKEN:
from_secret: token
commands:
- tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
- tea r rm -y current || echo "Release not found"
- tea r c --title "Latest Report" --asset report/report.pdf --asset upds-1/UPDS12-1.pdf --asset upds-2/UPDS12-2.pdf --asset results.txt --asset poster/poster.pdf current
- name: Remove current on failure
environment:
TOKEN:
from_secret: token
commands:
- tea login add --url https://git.andr3h3nriqu3s.com --token "$TOKEN"
- tea r rm -y current || echo "Release not found"
trigger:
status:
- failure
when:
status:
- failure
#- name: latest
# environment:
# TOKEN:
# from_secret: token
# commands:
# - tea r rm -y "3rd-metting" || echo "Release not found"
# - tea r c --title "Last Metting Report" --asset report/report.pdf --asset upds-1/UPDS12-1.pdf --asset upds-2/UPDS12-2.pdf "3rd-metting"
trigger:
branch:
- main
node:
lights: builder