diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..86d0d40 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build template + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build template + run: docker-compose build + + - name: Test local development + run: docker-compose up -d + + - name: Test if service is reachable + run: curl -s --retry 10 --retry-connrefused http://localhost:8000/ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5a26459 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: Deploy template + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install divio-cli + + - name: Deploy to Divio + run: | + divio login ${{ secrets.DIVIO_TOKEN }} + divio app deploy --remote-id ${{ secrets.DIVIO_WEBSITE_ID }}