Skip to content

delete background color (#151) #40

delete background color (#151)

delete background color (#151) #40

name: Déploiement en production
on:
push:
branches: [main]
jobs:
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version-file: package.json
- name: Retrieve cached dependencies
id: retrieve-dependencies
uses: actions/cache@v4
with:
key: node_modules-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Install dependencies
if: steps.retrieve-dependencies.outputs.cache-hit == false
run: npm ci --omit=dev
- name: Cache dependencies if not present
if: steps.retrieve-dependencies.outputs.cache-hit == false
uses: actions/cache@v4
with:
key: node_modules.-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Override .env
uses: SpicyPizza/[email protected]
with:
envkey_VITE_APP_API: ${{ secrets.REACT_APP_API_PRODUCTION }}
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.REACT_APP_PIX_CAMPAGNE_URL }}
file_name: .env
- name: Build application
run: npm run build
- name: Copy .htaccess
uses: canastro/copy-file-action@master
with:
source: .htaccess
target: dist/.htaccess
- name: Deploy on clever cloud
uses: s0/git-publish-subdir-action@develop
env:
REPO: ${{ secrets.CLEVER_CLOUD_GIT_PORTAIL_CANDIDAT_PRODUCTION }}
BRANCH: master
FOLDER: dist
SSH_PRIVATE_KEY: ${{ secrets.CLEVER_CLOUD_DEPLOY_PRIVATE_KEY }}
KNOWN_HOSTS_FILE: resources/known_hosts