Reduced input variables

This commit is contained in:
2026-05-21 20:25:33 -05:00
parent 72d84d5556
commit 178987a0f1
5 changed files with 75 additions and 124 deletions

View File

@@ -2,7 +2,7 @@ name: Deploy
on:
push:
branches: ["main", "**"]
branches: ["**"]
delete:
env:
@@ -14,8 +14,8 @@ env:
PANGOLIN_TARGET_IP: ${{ secrets.PANGOLIN_TARGET_IP }}
jobs:
deploy-production:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
deploy:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -23,43 +23,12 @@ jobs:
- uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/deploy@v1
with:
app-name: ${{ vars.APP_NAME }}
tag: production
port: ${{ vars.PROD_PORT }}
internal-port: ${{ vars.INTERNAL_PORT }}
environment: production
subdomain: ${{ vars.PROD_SUBDOMAIN }}
deploy-preview:
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compute preview slug
id: slug
uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/slug@v1
with:
branch: ${{ github.ref_name }}
- uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/deploy@v1
with:
app-name: ${{ vars.APP_NAME }}
tag: ${{ steps.slug.outputs.slug }}
port: ${{ steps.slug.outputs.port }}
internal-port: ${{ vars.INTERNAL_PORT }}
environment: preview
subdomain: ${{ steps.slug.outputs.slug }}.${{ vars.APP_NAME }}
cleanup-preview:
if: github.event_name == 'delete' && github.event.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- name: Compute preview slug
id: slug
uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/slug@v1
with:
branch: ${{ github.event.ref }}
- uses: actions/checkout@v4
with:
ref: main
@@ -67,4 +36,4 @@ jobs:
- uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/cleanup@v1
with:
app-name: ${{ vars.APP_NAME }}
slug: ${{ steps.slug.outputs.slug }}
branch: ${{ github.event.ref }}