mirror of
https://github.com/maciejpedzich/maciejpedzi.ch.git
synced 2024-11-10 00:13:02 +01:00
17 lines
543 B
YAML
17 lines
543 B
YAML
name: Build and deploy
|
|
on: [push]
|
|
|
|
jobs:
|
|
Build-And-Deploy:
|
|
runs-on: ubuntu-latest
|
|
container: catthehacker/ubuntu:act-22.04
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Build Docker image
|
|
run: docker build -t maciejpedzi.ch:latest .
|
|
- name: Rerun website's Docker container
|
|
run: docker stop my_website && \
|
|
docker rm $(docker ps -aqf "ancestor=maciejpedzi.ch:latest") && \
|
|
docker run -d -p 8505:80 --name my_website maciejpedzi.ch:latest
|