Publicar GitHub Pages #14
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: Publicar GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Actualizar juegos"] | |
| types: [completed] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Descargar el hub y sus juegos | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Configurar GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Preparar el sitio estático | |
| shell: bash | |
| run: | | |
| mkdir _site | |
| rsync -a \ | |
| --exclude='.git' \ | |
| --exclude='.github' \ | |
| --exclude='_site' \ | |
| ./ _site/ | |
| touch _site/.nojekyll | |
| - name: Empaquetar el sitio | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| - name: Publicar | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |