build before deploying to sevalla

This commit is contained in:
2026-01-17 18:55:16 -05:00
parent 4458db0cdd
commit 1afefe1301
2 changed files with 55 additions and 13 deletions
+55
View File
@@ -0,0 +1,55 @@
name: 'Deploy static site'
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout your repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build your Astro site
run: pnpm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
name: astro-build
deploy:
name: Sevalla Deploy
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: astro-build
path: ./artifact
- uses: sevalla-hosting/sevalla-deploy@v1.0.1
with:
action: deploy-static-site
sevalla-token: ${{ secrets.SEVALLA_TOKEN }}
static-site-id: ${{ secrets.STATIC_SITE_ID }}
branch: main
wait-for-finish: true