maciejpedzi.ch/.gitea/workflows/build-and-deploy.yaml

16 lines
492 B
YAML

name: Build and deploy
on: [push]
jobs:
Build-And-Deploy:
runs-on: ubuntu-latest:docker://catthehacker/ubuntu:runner-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build Docker image
run: docker build -t my_website:latest .
- name: Rerun website's Docker container
run: docker stop my_website && \
docker rm my_website && \
docker run -d -p 6969:80 --name my_website my_website:latest