Skip to content

Commit 6182333

Browse files
lionelloactions-user
authored andcommitted
Merge pull request #656 from defangdevs/fix/one-click-deploy-portal-flow
Point 1-click-deploy badges at Portal deploy flow
2 parents e702127 + fa0334d commit 6182333

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

.github/workflows/defang.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Defang
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
action:
10+
description: "Whether to deploy up or down"
11+
required: true
12+
default: "up"
13+
type: choice
14+
options:
15+
- up
16+
- down
17+
stack:
18+
description: "The stack to deploy up or down. (Leave blank for default)"
19+
default: ""
20+
21+
jobs:
22+
defang:
23+
name: Defang ${{ github.event.inputs.action || 'up' }} ${{
24+
github.event.inputs.stack || 'default stack' }}
25+
environment: defang-${{ github.event.inputs.stack || 'production' }}
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 70
28+
permissions:
29+
contents: read
30+
id-token: write
31+
32+
concurrency:
33+
cancel-in-progress: false
34+
group: deploy-${{ github.event.inputs.stack || 'default' }}
35+
36+
steps:
37+
- name: Checkout Repo
38+
uses: actions/checkout@v4
39+
40+
- name: Defang ${{ github.event.inputs.action || 'up' }} ${{
41+
github.event.inputs.stack || 'default stack' }}
42+
uses: DefangLabs/defang-github-action@v2
43+
with:
44+
command: ${{ github.event.inputs.action || 'up' }}
45+
stack: ${{ github.event.inputs.stack || '' }}
46+
47+
- name: Deployment Summary
48+
uses: DefangLabs/defang-github-action@v2
49+
with:
50+
command: services
51+
stack: ${{ github.event.inputs.stack || '' }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python & REST API
22

3-
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-python-rest-api-template%26template_owner%3DDefangSamples)
3+
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/python-rest-api)
44

55
This Flask application fetches average interest rates from the Fiscal Data Treasury API. It provides endpoints to check the status of the API and to retrieve the latest average interest rates. Note that alognside your .py file, include a requirements.txt so that the Dockerfile can install the necessary packages with pip.
66

0 commit comments

Comments
 (0)