Skip to content

chore(CI): add github workflow #23

chore(CI): add github workflow

chore(CI): add github workflow #23

Workflow file for this run

name: ci
on:
push:
branches:
- main
permissions:
contents: read
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install bun deps
run: bun install
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: node-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
restore-keys: |
node-${{ runner.os }}-
node-
- name: Bun build
run: bun run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.run_id }}-${{ github.run_attempt }}
path: dist
- name: Azure CLI Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Upload static files to Azure Storage
uses: azure/cli@v2
with:
inlineScript: |
az account show
az storage blob sync --auth-mode login --delete-destination true --account-name ${{ secrets.STORAGE_ACCOUNT_NAME }} -c '$web' -s dist