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 11:55:32 +02:00
|
|
|
run: chmod +x ./rerun-container.sh && (./rerun-container.sh ${{ vars.CONTAINER_NAME }} ${{ vars.PORT_PAIR }} ${{ vars.NETWORK_NAME }} ${{ vars.IMAGE_TAG }})
|