This repository has been archived by the owner on Dec 31, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
102 lines (89 loc) · 3.02 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# SPDX-FileCopyrightText: 2024 Pablo Portas López <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-only AND MIT AND Apache-2.0
name: 🔬 Comprobar documentación
on:
pull_request:
types: [ "opened" ]
paths: [ "docs/**" ]
workflow_dispatch:
permissions:
contents: read
id-token: write
pages: write
env:
INSTANCE: 'docs/pro'
DOCKER_VERSION: '243.22562'
jobs:
construir:
name: 📦 Construir
runs-on: ubuntu-latest
outputs:
algolia_artifact: ${{ steps.define-ids.outputs.algolia_artifact }}
artifact: ${{ steps.define-ids.outputs.artifact }}
steps:
- name: ⬇️ Checkout repositorio
# GitHub Actions
# MIT
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ✳️ Define instance id and artifacts
id: define-ids
run: |
INSTANCE=${INSTANCE#*/}
INSTANCE_ID_UPPER=$(echo "$INSTANCE" | tr '[:lower:]' '[:upper:]')
ARTIFACT="webHelp${INSTANCE_ID_UPPER}2-all.zip"
ALGOLIA_ARTIFACT="algolia-indexes-${INSTANCE_ID_UPPER}.zip"
# Print the values
echo "INSTANCE_ID_UPPER: $INSTANCE_ID_UPPER"
echo "ARTIFACT: $ARTIFACT"
echo "ALGOLIA_ARTIFACT: $ALGOLIA_ARTIFACT"
# Set the environment variables and outputs
echo "INSTANCE_ID_UPPER=$INSTANCE_ID_UPPER" >> $GITHUB_ENV
echo "ARTIFACT=$ARTIFACT" >> $GITHUB_ENV
echo "ALGOLIA_ARTIFACT=$ALGOLIA_ARTIFACT" >> $GITHUB_ENV
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
echo "algolia_artifact=$ALGOLIA_ARTIFACT" >> $GITHUB_OUTPUT
- name: 🏗️ Construir con Writerside usando Docker
# JetBrains Open Source
# Apache-2.0
# https://github.com/JetBrains/writerside-github-action
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}
- name: ⬆️ Subir artefacto con los resultados de la construcción
uses: actions/upload-artifact@v4
# GitHub Actions
# MIT
# https://github.com/actions/upload-artifact
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
artifacts/${{ env.ALGOLIA_ARTIFACT }}
retention-days: 7
comprobar:
name: 📊 Comprobar
needs: construir
runs-on: ubuntu-latest
steps:
- name: ⬇️ Descargar artefactos
# GitHub Actions
# MIT
# https://github.com/actions/download-artifact
uses: actions/download-artifact@v4
with:
name: docs
path: artifacts
- name: 📊 Comprobar documentación
# JetBrains Open Source
# Apache-2.0
# https://github.com/JetBrains/writerside-checker-action
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}