56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
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
|