Skip to content

Wonters is testing out GitHub Actions πŸš€ #43

Wonters is testing out GitHub Actions πŸš€

Wonters is testing out GitHub Actions πŸš€ #43

Workflow file for this run

name: Deploy alerting
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on:
push:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install -r requirements.txt
- name: Show Pytest Version
run: pytest --version
- name: Run tests
run: pytest src/tests
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner."
- run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -i ~/.ssh/id_rsa debian@shift.python.software.fr "cd /home/debian && git pull origin main && ./install.sh"