Skip to content

fix: source defaut logo header and dora footer #1747

fix: source defaut logo header and dora footer

fix: source defaut logo header and dora footer #1747

---
name: Validate feature
on:
push:
branches:
- 'build/*'
- 'chore/*'
- 'ci/*'
- 'docs/*'
- 'feat/*'
- 'fix/*'
- 'perf/*'
- 'refactor/*'
- 'revert/*'
- 'style/*'
- 'test/*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prettier:
name: Prettier
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: Prettier
run: yarn prettier --check .
eslint:
name: ESLint
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: Lint
run: yarn lint client-application
stylelint:
name: Stylelint
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: Lint
run: yarn stylelint "projects/client-application/**/*.scss"
commitlint:
name: CommitLint
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:
fetch-depth: 0
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: commitlint
run: |
cd projects/client-application
npx commitlint --from origin/main
test:
name: Test
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: Test
run: yarn test client-application
build-client-application:
name: Build Client Application
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: 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
build-mediation-numerique-web-component:
name: Build Mediation Numerique Web Component
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: Build
run: yarn build mediation-numerique
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
build-cartographie-web-component:
name: Build Cartographie Web Component
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: Build
run: yarn build cartographie
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
build-orientation-web-component:
name: Build Orientation Web Component
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: Build
run: yarn build orientation
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
build-coordinateurs-web-component:
name: Build Coordinateurs Web Component
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: Build
run: yarn build coordinateurs
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: dist
create-feature-branch-workspace:
name: Create feature branch workspace
uses: codingones/github-actions-workflows/.github/workflows/create-terraform-cloud-workspace-for-aws-ephemeral-environment.terraform.yml@main
with:
product: 'cartographie-nationale'
service: 'client'
branch: ${{ github.event.ref }}
secrets:
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
prepare-terraform-variables-file-content:
name: Prepare terraform variables file content
runs-on: ubuntu-latest
needs:
- create-feature-branch-workspace
outputs:
tf-vars: ${{ steps.tf-vars.outputs.content }}
steps:
- name: Set terraform variables file content in TF_VARS environment variable
id: tf-vars
run: >-
BASE_64_CONTENT=$(echo -en
'{
"product": "anct-carto",
"service": "client-${{ needs.create-feature-branch-workspace.outputs.tf-workspace }}",
"enable_bucket_website": true
}'
| base64
| tr -d \\n)
echo content=$BASE_64_CONTENT>>$GITHUB_OUTPUT
deploy-feature-branch-environment:
name: Deploy feature branch environment
needs:
- create-feature-branch-workspace
- prepare-terraform-variables-file-content
uses: codingones/github-actions-workflows/.github/workflows/apply.terraform.yml@main
with:
infrastructure-repository: 'anct-cartographie-nationale/client-infrastructure'
workspace-name: ${{ needs.create-feature-branch-workspace.outputs.tf-workspace }}
json-base-64-tf-vars: ${{ needs.prepare-terraform-variables-file-content.outputs.tf-vars }}
secrets:
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
publish-build-files:
runs-on: ubuntu-latest
needs:
- build-client-application
- create-feature-branch-workspace
- deploy-feature-branch-environment
steps:
- name: Download build
uses: actions/download-artifact@v3
with:
name: build
- name: Publish
uses: jakejarvis/s3-sync-action@v0.5.1
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: anct-carto-client-${{ needs.create-feature-branch-workspace.outputs.tf-workspace }}
SOURCE_DIR: 'client-application'
- name: See cartographie nationale client URL
run: |
echo http://anct-carto-client-${{ needs.create-feature-branch-workspace.outputs.tf-workspace }}.s3-website.eu-west-3.amazonaws.com