chore(deps): update dependency ofetch to ^1.4.0 (#905) #200
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
name: ⛵️ Push On Develop Branch Workflow | |
on: | |
push: | |
branches: | |
- "develop" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
upload-to-docker-hub: | |
name: Upload image with develop tag to Docker Hub 🐳 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- tag: preprod-fr | |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://preprod.api.werewolves-assistant.com" | |
NUXT_PUBLIC_DEFAULT_LOCALE: "fr" | |
NUXT_SITE_URL: "https://preprod.werewolves-assistant.com" | |
NUXT_SITE_NAME: "Preprod Assistant Loups-Garous" | |
NUXT_SITE_ENV: "development" | |
NUXT_SITE_DESCRIPTION: "[Preprod] - L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™" | |
- tag: preprod-en | |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "https://preprod.api.werewolves-assistant.com" | |
NUXT_PUBLIC_DEFAULT_LOCALE: "en" | |
NUXT_SITE_URL: "https://preprod.werewolves-assistant.com" | |
NUXT_SITE_NAME: "Preprod Werewolves Assistant" | |
NUXT_SITE_ENV: "development" | |
NUXT_SITE_DESCRIPTION: "[Preprod] - The perfect tool for game masters of the Werewolves of Miller's Hollow™" | |
- tag: local-preprod-fr | |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9292" | |
NUXT_PUBLIC_DEFAULT_LOCALE: "fr" | |
NUXT_SITE_URL: "http://localhost:3001" | |
NUXT_SITE_NAME: "Preprod Assistant Loups-Garous" | |
NUXT_SITE_ENV: "development" | |
NUXT_SITE_DESCRIPTION: "[Preprod] - L'outil parfait pour les Maîtres du jeu des Loups-Garous de Thiercelieux™" | |
- tag: local-preprod-en | |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL: "http://localhost:9292" | |
NUXT_PUBLIC_DEFAULT_LOCALE: "en" | |
NUXT_SITE_URL: "http://localhost:3001" | |
NUXT_SITE_NAME: "Preprod Werewolves Assistant" | |
NUXT_SITE_ENV: "development" | |
NUXT_SITE_DESCRIPTION: "[Preprod] - The perfect tool for game masters of the Werewolves of Miller's Hollow™" | |
steps: | |
- name: Checkout GitHub repository 📡 | |
uses: actions/checkout@v4 | |
- name: Log in to Docker Hub 🔐 | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push Docker images 🐳 | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: antoinezanardi/werewolves-assistant-web:${{ matrix.tag }} | |
build-args: | | |
NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL=${{ matrix.NUXT_PUBLIC_WEREWOLVES_ASSISTANT_API_BASE_URL }} | |
NUXT_PUBLIC_DEFAULT_LOCALE=${{ matrix.NUXT_PUBLIC_DEFAULT_LOCALE }} | |
NUXT_SITE_URL=${{ matrix.NUXT_SITE_URL }} | |
NUXT_SITE_NAME=${{ matrix.NUXT_SITE_NAME }} | |
NUXT_SITE_ENV=${{ matrix.NUXT_SITE_ENV }} | |
NUXT_SITE_DESCRIPTION=${{ matrix.NUXT_SITE_DESCRIPTION }} | |
deploy-to-preproduction: | |
name: Deploy to preproduction server 🚀 | |
runs-on: ubuntu-latest | |
needs: upload-to-docker-hub | |
steps: | |
- name: Deploy to preproduction server 🚀 | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.PREPRODUCTION_SERVER_SSH_PRIVATE_KEY }} | |
SSH_USER: ${{ secrets.PREPRODUCTION_SERVER_SSH_USER }} | |
SSH_SERVER_IP: ${{ secrets.PREPRODUCTION_SERVER_SSH_ADDRESS }} | |
UPDATE_SCRIPT_FULL_PATH: ${{ secrets.PREPRODUCTION_UPDATE_SCRIPT_FULL_PATH }} | |
run: | | |
eval $(ssh-agent -s) | |
echo "$SSH_PRIVATE_KEY" | ssh-add - | |
ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_SERVER_IP << EOF | |
$UPDATE_SCRIPT_FULL_PATH | |
EOF |