2024-02-23 16:36:32 +01:00
|
|
|
name: Build and deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2024-02-23 19:28:36 +01:00
|
|
|
Build-And-Deploy:
|
2024-02-23 19:46:00 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-03-26 17:25:27 +01:00
|
|
|
container: catthehacker/ubuntu:act-22.04
|
2024-02-23 16:36:32 +01:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build Docker image
|
2024-04-06 11:49:41 +02:00
|
|
|
run: docker build -t ${{ vars.IMAGE_TAG }} .
|
2024-02-23 16:36:32 +01:00
|
|
|
- name: Rerun website's Docker container
|
2024-04-06 12:02:13 +02:00
|
|
|
env:
|
|
|
|
CONTAINER_NAME: ${{ vars.CONATINER_NAME }}
|
|
|
|
NETWORK_NAME: ${{ vars.NETWORK_NAME }}
|
|
|
|
PORT_PAIR: ${{ vars.PORT_PAIR }}
|
|
|
|
IMAGE_TAG: ${{ vars.IMAGE_TAG }}
|
|
|
|
run: chmod +x ./rerun-container.sh && ./rerun-container.sh
|