From 57ff8cb77ff8099a9aed7c8ca9b5753ab0f36637 Mon Sep 17 00:00:00 2001 From: Xeu Date: Thu, 6 Jun 2024 12:56:37 +0800 Subject: [PATCH] ci: add vars in deploy.yaml --- .github/workflows/deploy.yaml | 54 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4c8bcd9e..ce821467 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,34 +1,38 @@ name: Deploy on: - push: - branches: - - main - workflow_dispatch: + push: + branches: + - main + workflow_dispatch: jobs: - deploy: - runs-on: ubuntu-latest + deploy: + runs-on: ubuntu-latest - steps: - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 21 + steps: + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 21 - - name: Clone Rin repository - uses: actions/checkout@v2 - with: - path: Rin + - name: Clone Rin repository + uses: actions/checkout@v4 + with: + path: Rin - - name: Set up Bun - uses: oven-sh/setup-bun@v1 + - name: Set up Bun + uses: oven-sh/setup-bun@v1 - - name: Deploy - env: # Or as an environment variable - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - run: | - cd Rin/ - bun i - bun server/migrator.ts \ No newline at end of file + - name: Deploy + env: # Or as an environment variable + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + DB_NAME: ${{ vars.DB_NAME }} + WORKER_NAME: ${{ vars.WORKER_NAME }} + FRONTEND_URL: ${{ vars.FRONTEND_URL }} + S3_FOLDER: ${{ vars.S3_FOLDER }} + run: | + cd Rin/ + bun i + bun server/migrator.ts