Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dev Deploy #3

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deploy Dev"
name: "Dev CI"

on:
workflow_dispatch:
Expand All @@ -9,15 +9,11 @@ on:
branches-ignore:
- master

#env:
# STACK_NAME: dev_django5-boiler
# STACK_FILE: docker-compose-swarm.yaml
# CONFIG_FILE: services/shane/django5-boiler/dev.env

jobs:
build:
name: "Build"
uses: ./.github/workflows/build.yaml
if: ${{ !contains(github.event.head_commit.message, '#noci') }}
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -49,8 +45,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: deploy
permissions:
contents: read
steps:
- name: "Purge Cache"
uses: cssnr/cloudflare-purge-cache-action@v1
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/dev-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Dev Deploy"

on:
workflow_dispatch:
inputs:
TAG:
description: "Tag to Deploy"
type: string
required: true
default: "Dev"
CLEANUP:
description: "Run Cleanup Steps"
type: boolean
required: true
default: true

jobs:
deploy:
name: "Deploy"
uses: ./.github/workflows/deploy.yaml
permissions:
contents: read
with:
GHCR_TAG: ${{ inputs.TAG}}
STACK_NAME: dev_django5-boiler
STACK_FILE: docker-compose-swarm.yaml
CONFIG_FILE: services/shane/django5-boiler/dev.env
secrets:
SERVICE_CONFIGS_KEY: ${{ secrets.SERVICE_CONFIGS_KEY }}
PORTAINER_URL: ${{ secrets.PORTAINER_URL }}
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}

cleanup:
name: "Cleanup"
runs-on: ubuntu-latest
timeout-minutes: 5
needs: deploy
if: ${{ inputs.CLEANUP == 'true' }}
steps:
- name: "Purge Cache"
uses: cssnr/cloudflare-purge-cache-action@v1
with:
token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
domains: cssnr.com
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
name: "Deploy Prod"
name: "Prod Deploy"

on:
workflow_dispatch:
repository_dispatch:
types:
- webhook
#push:
# branches-ignore:
# branches:
# - master

#env:
# STACK_NAME: prod_django5-boiler
# STACK_FILE: docker-compose-swarm.yaml
# CONFIG_FILE: services/shane/django5-boiler/prod.env

jobs:
build:
name: "Build"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: "Test"

on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Prod Deploy](https://img.shields.io/github/actions/workflow/status/cssnr/django5-boiler/prod-deploy.yaml?logo=github&logoColor=white&label=deploy)](https://github.com/cssnr/django5-boiler/actions/workflows/prod-deploy.yaml)
[![Dev CI](https://img.shields.io/github/actions/workflow/status/cssnr/django5-boiler/dev-ci.yaml?logo=github&logoColor=white&label=ci)](https://github.com/cssnr/django5-boiler/actions/workflows/dev-ci.yaml)
[![Test](https://img.shields.io/github/actions/workflow/status/cssnr/django5-boiler/test.yaml?logo=github&logoColor=white&label=test)](https://github.com/cssnr/django5-boiler/actions/workflows/test.yaml)
[![Deploy Prod](https://img.shields.io/github/actions/workflow/status/cssnr/django5-boiler/deploy-prod.yaml?logo=github&logoColor=white&label=deploy%20prod)](https://github.com/cssnr/django5-boiler/actions/workflows/deploy-prod.yaml)
[![Deploy Dev](https://img.shields.io/github/actions/workflow/status/cssnr/django5-boiler/deploy-dev.yaml?logo=github&logoColor=white&label=deploy%20dev)](https://github.com/cssnr/django5-boiler/actions/workflows/deploy-dev.yaml)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/django5-boiler?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/django5-boiler/graphs/commit-activity)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/django5-boiler?logo=htmx&logoColor=white)](https://github.com/cssnr/django5-boiler)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white)](https://cssnr.github.io/)
Expand Down
2 changes: 1 addition & 1 deletion app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>Home</h1>
This is your life now!
</p>
<p>
You dont know my life!
You don't know my life!
</p>

<div class="input-group mb-3">
Expand Down
Loading