Build(deps): Bump axios from 1.6.7 to 1.7.4 in /front #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push PHP Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./test | |
file: ./test/Dockerfile | |
push: true | |
tags: ossama98/monapp_php:latest | |
target: php | |
cache-from: type=registry,ref=ossama98/monapp_php:latest | |
cache-to: type=inline | |
build-args: | | |
DATABASE_URL=${{secrets.DATABASE_URL}} | |
BREVO_API_KEY=${{secrets.BREVO_API_KEY}} | |
deploy_to_ec2: | |
needs: build_and_push | |
runs-on: instance-ec2 | |
steps: | |
- name: Pull image from docker hub | |
run: docker pull ossama98/monapp_php:latest | |
- name: delete old container | |
run: docker rm -f php | |
- name: launch container php | |
run: docker run --name php -d --network monapp_network ossama98/monapp_php | |
- name: install dependencies | |
run: docker exec php composer install | |
- name: generate keypair | |
run: docker exec php bin/console lexik:jwt:generate-keypair --overwrite --no-interaction | |
deploy-frontend: | |
runs-on: ubuntu-latest | |
needs: deploy_to_ec2 | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install Vercel CLI | |
run: pnpm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |