Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

chore(deps): update dependency @ampt/cli to v1.0.13 (#217) #208

chore(deps): update dependency @ampt/cli to v1.0.13 (#217)

chore(deps): update dependency @ampt/cli to v1.0.13 (#217) #208

Workflow file for this run

name: Release Bata on commit to main
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
CI: true
on:
push:
branches: [main]
jobs:
pullrequest-job:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/frontend
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3.3.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js
uses: actions/setup-node@v4.0.0
with:
node-version-file: .nvmrc
- name: npm install
working-directory: . # use the root directory
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: deploy backend
env:
AMPT_API_KEY: ${{ secrets.AMPT_API_KEY }}
id: deploy-backend
working-directory: . # use the root directory
run: |
url=$(./scripts/deployAndGetUrl.sh beta)
echo aha $url
echo "BACKEND_URL=$url" >> "$GITHUB_OUTPUT"
- name: Pull Vercel Environment Information
run: npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: PUBLIC_BACKEND_URL=${{ steps.deploy-backend.outputs.BACKEND_URL}} PUBLIC_STAGE=beta npx vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
id: deploy-frontend
run: |
url=$(npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "FRONTEND_URL=$url" >> "$GITHUB_OUTPUT"
- name: set vercal beta alias
run: npx vercel alias ${{ steps.deploy-frontend.outputs.FRONTEND_URL}} beta.lists.pink --token ${{ secrets.VERCEL_TOKEN }}