2024-09-28 18:44:52 +00:00
|
|
|
name: Build and Deploy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Build project
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Deploy to BunnyCDN
|
2024-09-28 18:47:50 +00:00
|
|
|
uses: ayeressian/bunnycdn-storage-deploy@v2.2.3
|
2024-09-28 18:44:52 +00:00
|
|
|
with:
|
|
|
|
source: "./html"
|
2024-09-28 18:47:50 +00:00
|
|
|
destination: "/"
|
|
|
|
upload: "true"
|
|
|
|
remove: "true"
|
|
|
|
storageZoneName: ${{ secrets.BUNNYCDN_STORAGE_ZONE }}
|
|
|
|
storagePassword: ${{ secrets.BUNNYCDN_STORAGE_KEY }}
|