Initial website deployment
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 1m44s
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 1m44s
This commit is contained in:
31
.gitea/workflows/deploy.yaml
Normal file
31
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Deploy Website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build --pull -t akkolli-website:latest .
|
||||
|
||||
- name: Stop existing container
|
||||
run: |
|
||||
docker stop website-container || true
|
||||
docker rm website-container || true
|
||||
|
||||
- name: Run new container
|
||||
run: |
|
||||
docker run -d \
|
||||
--name website-container \
|
||||
--restart unless-stopped \
|
||||
-p 8080:80 \
|
||||
akkolli-website:latest
|
||||
Reference in New Issue
Block a user