blob: 947238adb0acd57ed20c9e33d520f3fa0accf008 (
plain) (
tree)
|
|
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.x]
runs-on: ubuntu-latest
name: 'Python ${{ matrix.python-version }}'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
- name: Run tests
run: make test
deploy:
needs: [test]
runs-on: ubuntu-latest
name: Deploy
if: github.ref == 'refs/heads/master'
env:
DOCKER_HOST: 'tcp://${{ secrets.DEPLOY_DOCKER_HOST }}:${{ secrets.DEPLOY_DOCKER_PORT }}'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up VPN
uses: egor-tensin/setup-wireguard@v1
with:
endpoint: '${{ secrets.WG_ENDPOINT }}'
endpoint_public_key: '${{ secrets.WG_ENDPOINT_PUBLIC_KEY }}'
ips: '${{ secrets.WG_IPS }}'
allowed_ips: '${{ secrets.WG_ALLOWED_IPS }}'
private_key: '${{ secrets.WG_PRIVATE_KEY }}'
preshared_key: '${{ secrets.WG_PRESHARED_KEY }}'
- name: Deploy
run: make deploy
|