migrate hcaptcha vers turnstile (captcha cloudflare) (#248) #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: Déploiement en recette | |
on: | |
push: | |
branches: [recette] | |
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 | |
- name: Override .env | |
uses: SpicyPizza/[email protected] | |
with: | |
envkey_VITE_APP_BLOG_URL: https://beta.media.conseiller-numerique.gouv.fr | |
envkey_VITE_APP_DASHBOARD_URL: https://beta.pilotage.conseiller-numerique.gouv.fr | |
envkey_VITE_APP_COOP_URL: https://coop-numerique.anct.gouv.fr | |
envkey_VITE_APP_CANDIDAT_URL: https://beta.candidat.conseiller-numerique.gouv.fr/login | |
envkey_VITE_APP_FORMS_URL: https://uat-cnum-front.osc-fr1.scalingo.io/candidature | |
envkey_VITE_APP_AIDE_URL: https://aide.conseiller-numerique.gouv.fr/fr | |
envkey_VITE_APP_API_URL: ${{ secrets.REACT_APP_API_RECETTE }} | |
envkey_VITE_APP_API_PILOTAGE_URL: ${{ secrets.REACT_APP_API_PILOTAGE_RECETTE }} | |
file_name: .env | |
- name: Copy robots.txt | |
uses: canastro/copy-file-action@master | |
with: | |
source: desindexation/robots.txt | |
target: public/robots.txt | |
- 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_SITE_VITRINE_RECETTE }} | |
BRANCH: master | |
FOLDER: dist | |
SSH_PRIVATE_KEY: ${{ secrets.CLEVER_CLOUD_DEPLOY_PRIVATE_KEY }} | |
KNOWN_HOSTS_FILE: resources/known_hosts |