Déploiement du site sur preprod #220
Workflow file for this run
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 du site | |
run-name: Déploiement du site sur ${{ github.event.inputs.target }} | |
on: | |
workflow_dispatch: | |
inputs: | |
target: | |
type: choice | |
description: Où déployer | |
options: | |
- preprod | |
- prod | |
jobs: | |
deploy-site: | |
name: Déploie le site | |
environment: ${{ github.event.inputs.target }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: earthly/actions-setup@v1 | |
with: | |
github-token: ${{ secrets.GH_TOKEN }} | |
version: ^0.8.0 | |
- name: Login into registry | |
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}" | |
- name: Build and push site image | |
run: > | |
earthly | |
--use-inline-cache --save-inline-cache --push | |
--platform=linux/amd64 | |
+site-docker | |
--ENV_NAME=${{ github.event.inputs.target }} | |
--ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }} | |
--STRAPI_KEY=${{ secrets.STRAPI_KEY }} --STRAPI_URL=${{ secrets.STRAPI_URL }} | |
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }} | |
--AXEPTIO_ID=${{ vars.AXEPTIO_ID }} | |
--APP_URL=${{ vars.APP_URL }} | |
--PANIER_URL=${{ vars.PANIER_URL }} | |
--AUTH_URL=${{ vars.AUTH_URL }} | |
--CRISP_WEBSITE_ID=${{ vars.CRISP_WEBSITE_ID }} | |
- name: Deploy site on Koyeb | |
run: > | |
earthly | |
--use-inline-cache | |
+site-deploy | |
--ENV_NAME=${{ github.event.inputs.target }} | |
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }} |