From e4f79bbf2b74552bbe18a6fc055d84a1265aeaf1 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Fri, 16 Dec 2022 17:50:25 -0300 Subject: [PATCH] improve build step from ci, now the build occurs using vercel --- .github/workflows/ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e43e132..ac050ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,19 +23,18 @@ jobs: build: runs-on: ubuntu-latest + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_STAGING }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STAGING }} steps: - name: 🏗 Setup repo uses: actions/checkout@v3 - - name: 📦 Build docker image - run: | - docker build -t p2pix:$GITHUB_SHA . - docker save -o image_$GITHUB_SHA p2pix:$GITHUB_SHA + - name: 🏗 Install Vercel CLI + run: npm install --global vercel@latest - - name: 📦 Put docker image in cache - uses: actions/cache@v3 - with: - key: p2pix - path: image_${{ github.sha }} + - name: 🏗 Pull staging app from vercel environment + run: vercel pull --yes --token=${{ secrets.VERCEL_AUTH_TOKEN }} - # test job \ No newline at end of file + - name: 📦 Build staging app artifacts + run: vercel build --token=${{ secrets.VERCEL_AUTH_TOKEN }} \ No newline at end of file