mirror of
https://github.com/jaypyles/Scraperr.git
synced 2026-05-03 07:50:41 +00:00
wip: add ci
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
name: ci
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{secrets.DOCKERHUB_REPO}}:latest
|
||||
@@ -43,3 +43,10 @@ up-dev:
|
||||
down:
|
||||
$(COMPOSE_DEV) down
|
||||
$(COMPOSE_PROD) down
|
||||
|
||||
setup:
|
||||
ansible-playbook -i ./ansible/inventory.yaml ./ansible/setup.yaml
|
||||
|
||||
deploy:
|
||||
ansible-playbook -i ./ansible/inventory.yaml ./ansible/deploy_site.yaml
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
github_repo: https://github.com/jaypyles/webapp-template.git
|
||||
deploy_path: /home/admin/website
|
||||
deploy_command: make pull up-prd
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
vars_files:
|
||||
- ./config.yaml
|
||||
tasks:
|
||||
- name: Run make pull up
|
||||
command: make pull up
|
||||
- name: Deploy
|
||||
command: "{{deploy_command}}"
|
||||
args:
|
||||
chdir: "{{deploy_path}}"
|
||||
|
||||
Reference in New Issue
Block a user