Anade la portada del repositorio #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: ["20", "22"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: Instalar exactamente lo que fija el lockfile | |
| run: npm ci | |
| - name: Compilar | |
| run: npm run build | |
| - name: Comprobar que la compilacion ha producido algo | |
| run: | | |
| test -d dist || { echo "no hay carpeta dist"; exit 1; } | |
| test -f dist/index.html || { echo "dist sin index.html"; exit 1; } | |
| echo "dist: $(find dist -type f | wc -l) ficheros" |