Skip to content

feat: precision metrics par producteur matomo (#505) #376

feat: precision metrics par producteur matomo (#505)

feat: precision metrics par producteur matomo (#505) #376

---
name: Deploy on S3
on:
push:
branches:
- 'main'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout project workspace repository
uses: actions/checkout@v3
with:
repository: anct-cartographie-nationale/client-base
- name: Checkout client-application repository
uses: actions/checkout@v3
with:
path: projects/client-application
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Set mednum custom style
run: cp -r projects/client-application/src/scss.mednum/* projects/client-application/src/scss
- name: Build
run: yarn build client-application
- name: Lieux mediation num茅rique data from API
run: curl https://cartographie.societenumerique.gouv.fr/api/v0/lieux-inclusion-numerique | gunzip >> ./dist/client-application/assets/data/lieux-inclusion-numerique.json
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build
uses: actions/download-artifact@v3
with:
name: build
- name: Deploy
uses: kersvers/s3-sync-with-cloudfront-invalidation@v1.0.0
with:
args: --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
SOURCE_DIR: 'client-application'