Skip to content

feat: Add workflow to sync build assets to CDN #1

feat: Add workflow to sync build assets to CDN

feat: Add workflow to sync build assets to CDN #1

Workflow file for this run

name: Sync build assets to CDN
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Website
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Sync build assets
uses: patrickwyler/[email protected]
with:
secrets: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
bucket: "tiara-assets"
exclude: '.*\.md$|\.gitignore$|\.git/.*$|\.github/.*$'
sync_dir_from: ".next/static"
sync_dir_to: "assets/_next/static"