improve build step from ci, now the build occurs using vercel

This commit is contained in:
RcleydsonR 2022-12-16 17:50:25 -03:00
parent 150a325bdc
commit e4f79bbf2b

View File

@ -23,19 +23,18 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_STAGING }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STAGING }}
steps: steps:
- name: 🏗 Setup repo - name: 🏗 Setup repo
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: 📦 Build docker image - name: 🏗 Install Vercel CLI
run: | run: npm install --global vercel@latest
docker build -t p2pix:$GITHUB_SHA .
docker save -o image_$GITHUB_SHA p2pix:$GITHUB_SHA
- name: 📦 Put docker image in cache - name: 🏗 Pull staging app from vercel environment
uses: actions/cache@v3 run: vercel pull --yes --token=${{ secrets.VERCEL_AUTH_TOKEN }}
with:
key: p2pix
path: image_${{ github.sha }}
# test job - name: 📦 Build staging app artifacts
run: vercel build --token=${{ secrets.VERCEL_AUTH_TOKEN }}