ci: update deploy github

This commit is contained in:
Alejandro Laguna
2025-08-25 19:44:50 +02:00
parent 2284eefae3
commit da6b5ba46e
2 changed files with 54 additions and 3 deletions

50
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Deploy Astro site to GitHub Pages
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4