From da6b5ba46e7283291b184f3357444e48cb77e69b Mon Sep 17 00:00:00 2001 From: Alejandro Laguna Date: Mon, 25 Aug 2025 19:44:50 +0200 Subject: [PATCH] ci: update deploy github --- .github/workflows/deploy.yml | 50 ++++++++++++++++++++++++++++++++++++ astro.config.mjs | 7 ++--- 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e5859b3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 + diff --git a/astro.config.mjs b/astro.config.mjs index 7086e41..cc7cc4a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,14 +2,15 @@ import { defineConfig } from 'astro/config'; import tailwindcss from "@tailwindcss/vite"; import astroIcon from "astro-icon" -import cloudflare from '@astrojs/cloudflare'; // https://astro.build/config export default defineConfig({ vite: { plugins: [tailwindcss()], }, integrations: [astroIcon()], + site: 'https://alejandrolaguna.dev', + base: "/", + output: "static", server: { - host: '0.0.0.0' + host: '0.0.0.0', }, - adapter: cloudflare(), });