🚧 Base para mostrar contenido de páginas generales #13
This file contains 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: 🐘 Despliegue | |
on: | |
push: | |
branches: ['main'] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
env: | |
BUILD_PATH: './aplicaciones/www' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🐯 Obtener código del repositorio | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🐜 Activar Corepack | |
run: corepack enable | |
- name: 🐝 Usar Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'yarn' | |
- name: 🐾 Configurar página GitHub | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: 🦒 Instalar dependencias | |
run: | | |
yarn install --immutable | |
- name: Build with Astro | |
run: | | |
yarn astro build \ | |
--site "${{ steps.pages.outputs.origin }}" \ | |
--base "${{ steps.pages.outputs.base_path }}" | |
working-directory: ${{ env.BUILD_PATH }} | |
- name: 🐉 Subir archivos | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ${{ env.BUILD_PATH }}/publico | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
runs-on: ubuntu-latest | |
name: 🦦 Despliegue | |
steps: | |
- name: 🐄 Desplegando en GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |