Skip to content

Commit

Permalink
Add Render.com deployment to Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonakoudijs committed Dec 28, 2023
1 parent 1a9c451 commit 51751f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
check-requirements:
name: Check Requirements
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set Version Tag
run: echo "API_TAG=$(echo $GITHUB_REF | awk -F '/' '{print $NF}')" >> $GITHUB_ENV
Expand All @@ -17,7 +17,7 @@ jobs:

build-image:
name: Build Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: check-requirements
steps:
- uses: actions/checkout@v3
Expand All @@ -35,7 +35,7 @@ jobs:

update-readme:
name: Update Readme
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Update Docker Hub Description
Expand All @@ -47,7 +47,7 @@ jobs:

deploy-fly:
name: Deploy Fly.io
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [check-requirements, build-image]
steps:
- uses: actions/checkout@v3
Expand All @@ -57,4 +57,15 @@ jobs:
- name: Deploy API on Fly.io
run: flyctl deploy --app steamcmd --image steamcmd/api:${{ env.API_VERSION }} -e VERSION=${{ env.API_VERSION }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_ACCESS_TOKEN }}
FLY_API_TOKEN: ${{ secrets.FLY_ACCESS_TOKEN }}

deploy-render:
name: Deploy Render.com
runs-on: ubuntu-22.04
needs: [check-requirements, build-image]
steps:
- uses: actions/checkout@v3
- name: Parse API Version
run: echo "API_VERSION=$(echo $GITHUB_REF | awk -F '/' '{print $NF}' | cut -c 2-)" >> $GITHUB_ENV
- name: Deploy API on Render.com
run: curl https://api.render.com/deploy/${{ secrets.RENDER_SERVICE_ID }}?key=${{ secrets.RENDER_API_KEY }}&imgURL=docker.io%2Fsteamcmd%2Fapi%40${{ env.API_VERSION }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:
jobs:
test-image:
name: Test Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Build Image
run: docker build -t steamcmd/api:latest .

python-lint:
name: Python Lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ricardochaves/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SteamCMD API

Read-only API interface for steamcmd app_info. Updates of this code are
automatically deployed on Fly.io via [Github Actions](https://github.com/steamcmd/api/actions)
automatically deployed via [Github Actions](https://github.com/steamcmd/api/actions)
when a new version has been created on Github.

## Self-hosting
Expand Down

0 comments on commit 51751f3

Please sign in to comment.