35 lines
866 B
YAML
35 lines
866 B
YAML
name: dancefinder-app
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
|
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: buildtool/setup-buildtools-action@v1
|
|
- name: Build and push
|
|
run: unset GITEA_TOKEN && build && push
|
|
|
|
deploy-prod:
|
|
needs: build
|
|
if: gitea.ref == 'refs/heads/main'
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
|
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
|
KUBECONFIG_CONTENT: ${{ secrets.KUBECONFIG_CONTENT }}
|
|
environment: prod
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: buildtool/setup-buildtools-action@v1
|
|
- name: Deploy
|
|
run: deploy prod
|