diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d0c3a66 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +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 + uses: ayeressian/bunnycdn-storage-deploy@v1 + with: + source: "./html" + storage_zone: ${{ secrets.BUNNYCDN_STORAGE_ZONE }} + storage_key: ${{ secrets.BUNNYCDN_STORAGE_KEY }} + pull_zone: ${{ secrets.BUNNYCDN_PULL_ZONE }} + destination: "/" \ No newline at end of file