1- name : Label Issues and Clean Titles
1+ name : Deploy Tecovolt Docs to GitHub Pages
22
33on :
44 workflow_dispatch :
55 push :
66 branches :
77 - main
8- paths :
9- - ' .github/workflows/label-issues.yml'
108
11- jobs :
12- label-and-clean :
13- runs-on : ubuntu-latest
14- permissions :
15- issues : write
9+ env :
10+ REPO_NAME : ${{ github.event.repository.name }}
11+ REPO_OWNER : ${{ github.repository_owner }}
1612
13+ jobs :
14+ deploy :
15+ runs-on : ubuntu-22.04
16+ concurrency :
17+ group : ${{ github.workflow }}-${{ github.ref }}
1718 steps :
18- - name : Create labels
19- env :
20- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21- REPO : ${{ github.repository }}
22- run : |
23- create_label() {
24- local name="$1"
25- local color="$2"
26- local description="$3"
27- gh label create "$name" --color "$color" --description "$description" --repo "$REPO" 2>/dev/null \
28- || gh label edit "$name" --color "$color" --description "$description" --repo "$REPO" 2>/dev/null \
29- || echo "Label '$name' already up to date."
30- }
31-
32- create_label "hardware" "e4e669" "Hardware / physical assembly tasks"
33- create_label "firmware" "0075ca" "Firmware / MCU code tasks"
34- create_label "software" "d93f0b" "Software / MPU Python backend tasks"
35- create_label "edge-ai" "7057ff" "AI / machine learning tasks"
36- create_label "integracion" "0e8a16" "Integration and demo tasks"
37-
38- - name : Update issues - remove prefix and add labels
39- env :
40- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41- REPO : ${{ github.repository }}
42- run : |
43- update_issue() {
44- local issue_number="$1"
45- local label="$2"
46- local new_title="$3"
47-
48- echo "Updating issue #${issue_number}: label='${label}', title='${new_title}'"
49- gh issue edit "$issue_number" \
50- --title "$new_title" \
51- --add-label "$label" \
52- --repo "$REPO"
53- }
54-
55- # Hardware issues [HW-XX]
56- update_issue 2 "hardware" "Validar aislamiento galvanico ZMPT101B"
57- update_issue 3 "hardware" "Validar circuito de bateria LiPo + MT3608"
58- update_issue 4 "hardware" "Prueba de relay optoacoplado con carga de prueba"
59- update_issue 5 "hardware" "Montaje del panel frontal: LED RGB y buzzer"
60- update_issue 6 "hardware" "Prueba de estres termico del enclosure"
61-
62- # Firmware issues [FW-XX]
63- update_issue 7 "firmware" "Setup del entorno Arduino App Lab para Uno Q"
64- update_issue 8 "firmware" "Loop de muestreo ADC a 1kHz para voltaje y corriente"
65- update_issue 9 "firmware" "Integracion lectura BME280 via I2C"
66- update_issue 10 "firmware" "Exportar e integrar modelos Edge Impulse al MCU"
67- update_issue 11 "firmware" "Implementar maquina de estados de riesgo"
68- update_issue 12 "firmware" "Serializacion JSON MCU a MPU por UART"
69-
70- # Software issues [SW-XX]
71- update_issue 13 "software" "Setup del entorno Python en MPU Linux"
72- update_issue 14 "software" "UART reader: parseo del JSON del MCU"
73- update_issue 15 "software" "Logger SQLite de eventos y lecturas"
74- update_issue 16 "software" "Integracion Twilio: envio de alertas por WhatsApp"
75- update_issue 17 "software" "Webhook Flask: recepcion de comandos por WhatsApp"
76- update_issue 18 "software" "Dashboard web historico con Flask"
77-
78- # AI issues [AI-XX]
79- update_issue 19 "edge-ai" "Recoleccion y etiquetado de datos en Edge Impulse"
80- update_issue 20 "edge-ai" "Entrenamiento Modelo A: anomalia de voltaje K-means"
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ submodules : false
23+
24+ - name : Setup Hugo
25+ uses : peaceiris/actions-hugo@v3
26+ with :
27+ hugo-version : " 0.145.0"
28+ extended : true
29+
30+ - name : Setup Node
31+ uses : actions/setup-node@v4
32+ with :
33+ node-version : " 20"
34+ cache : " npm"
35+ cache-dependency-path : " **/package-lock.json"
36+
37+ - run : npm ci
38+
39+ - name : Setup Go
40+ uses : actions/setup-go@v5
41+ with :
42+ go-version : " 1.21"
43+
44+ - run : >-
45+ hugo --baseURL https://${REPO_OWNER}.github.io/${REPO_NAME}
46+ --minify
47+
48+ - name : Deploy
49+ uses : peaceiris/actions-gh-pages@v4
50+ if : ${{ github.ref == 'refs/heads/main' }}
51+ with :
52+ github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments