Skip to content

Merge pull request #46 from hackerspace-ntnu/auto-deploy #7

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

Merge pull request #46 from hackerspace-ntnu/auto-deploy #7

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
path: website-next
secrets:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
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
path: website-next
secrets:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}