build before deploying to sevalla
This commit is contained in:
@@ -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
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
deploy-static-site:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Sevalla Deploy
|
|
||||||
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
|
|
||||||
Reference in New Issue
Block a user