From d5e35bda683a80eda18e44b0d954d2c9553faa0e Mon Sep 17 00:00:00 2001 From: Andrew Li Date: Tue, 1 Aug 2023 14:19:00 -0400 Subject: [PATCH] Add deployment script --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..dbe2fa1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +# Andrew Li's Deploy to Private Repo Action +name: 😎 Deploy Production + +on: + workflow_dispatch: + push: + branches: [t3-rewrite] + +jobs: + build-deploy-frontend: + name: 🎉 Build and Deploy Frontend + runs-on: ubuntu-latest + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v2 + + - name: 🔨 Set up Node 16.17.0 + uses: actions/setup-node@v2 + with: + node-version: 16.17.0 + + - name: ⛏ Build Frontend + run: | + npm ci + npm run lint + npm run build + cd .. + + - name: ☁ Deploy to Vercel Git Repo + uses: wei/git-sync@v3 + with: + source_repo: "https://github.com/fullstackatbrown/carte-blanche.git" + source_branch: "t3-rewrite" + destination_repo: "https://andrew7li:${{ secrets.PAT }}@github.com/andrew7li/carte-blanche-deploy.git" + destination_branch: "deploy"