Skip to content

Merge pull request #40 from hackerspace-ntnu/auto-deploy #2

Merge pull request #40 from hackerspace-ntnu/auto-deploy

Merge pull request #40 from hackerspace-ntnu/auto-deploy #2

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment'
required: true
default: 'Development'
enum: ['Production', 'Development']
jobs:
deploy-prod:
name: Production
if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Production')
uses: ./.github/workflows/deploy-script.yml
with:
environment: Production
branch: main
secrets:
host: ${{ secrets.ssh_host }}
port: ${{ secrets.ssh_port }}
key: ${{ secrets.ssh_key }}
username: ${{ secrets.username }}
deploy-dev:
name: Development
if: github.ref == 'refs/heads/dev' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Development')
uses: ./.github/workflows/deploy-script.yml
with:
environment: Development
branch: dev
secrets:
host: ${{ secrets.ssh_host }}
port: ${{ secrets.ssh_port }}
key: ${{ secrets.ssh_key }}
username: ${{ secrets.username }}