Skip to content

Commit

Permalink
feat: Add workflow to sync build assets to CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
rabilrbl committed Apr 22, 2024
1 parent fdb748e commit 6a5aacd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/sync-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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"

0 comments on commit 6a5aacd

Please sign in to comment.