Skip to content

Commit

Permalink
add delpoy environments
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienheureux committed Jan 29, 2025
1 parent fb9d412 commit 1fb0f4f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ defaults:
shell: bash

jobs:
run_tests:
uses: ./.github/workflows/run_tests.yml
# run_tests:
# uses: ./.github/workflows/run_tests.yml
deploy:
environment: preprod
url: https://quefairedemesobjets-preprod.osc-fr1.scalingo.io
uses: ./.github/workflows/deploy.yml
66 changes: 66 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

name: "Déploiement continu"

on:
workflow_call:
push:
branches:
- main

defaults:
run:
shell: bash

jobs:
deploy:
name: Deploy on Scalingo
needs: [run_tests]
runs-on: ubuntu-latest
steps:
- uses: action/checkout@v4
- uses: kolok/deploy-to-scalingo@v1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
known-host: ssh.osc-fr1.scalingo.com
app-name: quefairedemesobjets-preprod

- uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
PAYLOAD: |-
{
"text": "Le déploiement s'est déroulé avec succès. Il est visible sur https://quefairedemesobjets-preprod.osc-fr1.scalingo.io",
"channel": "lvao-tour-de-controle",
"username": "Bipboop le robot de seconde main",
"icon": "https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png"
}
deploy_airflow-webserver:
name: Deploy PREPROD Airflow webserver on Clever Cloud
needs: [run_tests]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: 47ng/[email protected]
with:
alias: lvao-preprod-airflow-webserver
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}


deploy_airflow-scheduler:
name: Deploy PREPROD Airflow scheduler on Clever Cloud
needs: [run_tests]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: 47ng/[email protected]
with:
alias: lvao-preprod-airflow-scheduler
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

0 comments on commit 1fb0f4f

Please sign in to comment.