Skip to content

Commit 213d191

Browse files
updated the actual deployment
1 parent 7e37f35 commit 213d191

2 files changed

Lines changed: 49 additions & 73 deletions

File tree

‎.github/workflows/label-issues.yml‎

Lines changed: 43 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,52 @@
1-
name: Label Issues and Clean Titles
1+
name: Deploy Tecovolt Docs to GitHub Pages
22

33
on:
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 }}

‎docs/.github/workflows/deploy-github-pages.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
runs-on: ubuntu-22.04
1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
18+
defaults:
19+
run:
20+
working-directory: docs
1821
steps:
1922
- uses: actions/checkout@v4
2023
with:
@@ -32,7 +35,7 @@ jobs:
3235
with:
3336
node-version: "20"
3437
cache: "npm"
35-
cache-dependency-path: "**/package-lock.json"
38+
cache-dependency-path: "docs/package-lock.json"
3639

3740
- run: npm ci
3841

@@ -49,4 +52,5 @@ jobs:
4952
uses: peaceiris/actions-gh-pages@v4
5053
if: ${{ github.ref == 'refs/heads/main' }}
5154
with:
52-
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_dir: docs/public

0 commit comments

Comments
 (0)