Skip to content

Ajoute un cron mensuel pour exécuter le script de génération de stats MongoDB #88

Ajoute un cron mensuel pour exécuter le script de génération de stats MongoDB

Ajoute un cron mensuel pour exécuter le script de génération de stats MongoDB #88

Workflow file for this run

name: "Continuous Integration"
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
SSH_HOST: 51.91.16.19
SSH_USER: debian
jobs:
install:
name: Install Python requirements
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: pip install -r requirements.txt
lint:
name: Lint ansible files
runs-on: ubuntu-20.04
needs: [install]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Check installed package
run: pip freeze
- name: Run ansible lint
run: ansible-lint --offline
deployment:
name: Continuous deployment
runs-on: ubuntu-20.04
needs: [install, lint]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Eclipse Deployment
shell: bash
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.ECLIPSE_PRIVATE_KEY }}" > ~/.ssh/eclipse
chmod 600 ~/.ssh/eclipse
ssh -o StrictHostKeyChecking=no ${{ env.SSH_USER }}@${{ env.SSH_HOST }} -i ~/.ssh/eclipse