ops: add ci/cd for web app
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 26s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 26s
This commit is contained in:
parent
51c8b380cf
commit
f9664fd1ed
@ -1,19 +0,0 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,34 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
registry: docker-registry.internal.rferee.dev
|
||||
|
||||
- name: Build and Push Docker Image
|
||||
run: |
|
||||
docker build -t docker-registry.internal.rferee.dev/gfxv/public/web .
|
||||
docker push docker-registry.internal.rferee.dev/gfxv/public/web
|
||||
|
||||
- name: Trigger Portainer Webhook
|
||||
uses: peter-evans/http-post-action@v1
|
||||
with:
|
||||
url: ${{ secrets.PORTAINER_WEBHOOK_URL }}
|
||||
method: 'POST'
|
||||
headers: 'Content-Type: application/json'
|
||||
body: '{}'
|
||||
|
||||
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM nginx:latest-alpine
|
||||
|
||||
COPY ./src/ /usr/share/nginx/html/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user