Skip to content

Changement de l'appel du css de la carto #2

Changement de l'appel du css de la carto

Changement de l'appel du css de la carto #2

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
- 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
build:
needs: dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Retrieve cached dependencies
uses: actions/cache@v4
with:
key: node_modules-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Override .env
uses: SpicyPizza/[email protected]
with:
envkey_REACT_APP_BLOG_URL: "https://media.conseiller-numerique.gouv.fr"
envkey_REACT_APP_DASHBOARD_URL: "https://pilotage.conseiller-numerique.gouv.fr"
envkey_REACT_APP_COOP_URL: "https://coop.conseiller-numerique.gouv.fr/login"
envkey_REACT_APP_CANDIDAT_URL: "https://candidat.conseiller-numerique.gouv.fr/login"
envkey_REACT_APP_FORMS_URL: "https://app.conseiller-numerique.gouv.fr/candidature"
envkey_REACT_APP_AIDE_URL: "https://aide.conseiller-numerique.gouv.fr/fr"
envkey_REACT_APP_API_URL: ${{ secrets.REACT_APP_API_PRODUCTION }}
file_name: .env
- name: Build application
run: npm run build
- name: copy .htaccess
uses: canastro/copy-file-action@master
with:
source: ".htaccess"
target: "build/.htaccess"
- name: Upload release bundle as artifact
uses: actions/upload-artifact@v4
with:
name: bundle
path: build/*
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Retrieve bundle React
uses: actions/download-artifact@v4
with:
name: bundle
path: build
- name: Deploy on clever cloud
uses: s0/git-publish-subdir-action@develop
env:
REPO: ${{ secrets.CLEVER_SITE_VITRINE_PRODUCTION }}
BRANCH: master
FOLDER: build
SSH_PRIVATE_KEY: ${{ secrets.CLEVER_CLOUD_DEPLOY_PRIVATE_KEY }}
KNOWN_HOSTS_FILE: resources/known_hosts