diff --git a/.bicep/local.bicep b/.bicep/local.bicep deleted file mode 100644 index d729698..0000000 --- a/.bicep/local.bicep +++ /dev/null @@ -1,41 +0,0 @@ -targetScope = 'subscription' - -@description('The ID of the user to deploy resources for') -param userId string - -@description('The Azure region to deploy to') -param region string - -var resourceToken = take(toLower(uniqueString(subscription().id, 'modkit', userId, region)), 7) - -resource azResourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { - name: 'rg-modkit-local-${userId}' - location: region -} - -module azServiceBusNamespace 'resources/azServiceBusNamespace.bicep' = { - name: 'azServiceBusNamespace' - scope: azResourceGroup - params: { - name: 'sbns-modkit-local-${userId}-${resourceToken}' - location: region - } -} - -module azServiceBusQueue 'resources/azServiceBusQueue.bicep' = { - name: 'azServiceBusQueue' - scope: azResourceGroup - params: { - name: 'sbq-modkit-local-${userId}-${resourceToken}' - serviceBusNamespaceName: azServiceBusNamespace.outputs.name - duplicateDetection: true - session: true - deadLettering: true - partitioning: false - express: false - } -} - -output resourceGroupName string = azResourceGroup.name -output serviceBusNamespaceName string = azServiceBusNamespace.outputs.name -output serviceBusQueueName string = azServiceBusQueue.outputs.name diff --git a/.bicep/resources/azServiceBusNamespace.bicep b/.bicep/resources/azServiceBusNamespace.bicep deleted file mode 100644 index 24632e2..0000000 --- a/.bicep/resources/azServiceBusNamespace.bicep +++ /dev/null @@ -1,13 +0,0 @@ -param name string -param location string - -resource azServiceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' = { - name: name - location: location - sku: { - name: 'Standard' - } - properties: {} -} - -output name string = azServiceBusNamespace.name diff --git a/.bicep/resources/azServiceBusQueue.bicep b/.bicep/resources/azServiceBusQueue.bicep deleted file mode 100644 index 0d8c221..0000000 --- a/.bicep/resources/azServiceBusQueue.bicep +++ /dev/null @@ -1,25 +0,0 @@ -param name string -param serviceBusNamespaceName string -param duplicateDetection bool -param session bool -param deadLettering bool -param partitioning bool -param express bool - -resource azServiceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' existing = { - name: serviceBusNamespaceName -} - -resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2022-01-01-preview' = { - parent: azServiceBusNamespace - name: name - properties: { - requiresDuplicateDetection: duplicateDetection - requiresSession: session - deadLetteringOnMessageExpiration: deadLettering - enablePartitioning: partitioning - enableExpress: express - } -} - -output name string = serviceBusQueue.name diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 167afb7..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: FinOCE diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml deleted file mode 100644 index 641d6f2..0000000 --- a/.github/workflows/local.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Setup Local - -on: - workflow_dispatch: - inputs: - USER_ID: - description: "The ID of the user to deploy resources for" - required: true - default: "fin" - - REGION: - description: "The Azure region to deploy to" - required: true - default: "australiaeast" - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Log into Azure - uses: azure/login@v2 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Build infrastructure - id: bicep - uses: azure/arm-deploy@v1 - with: - scope: "subscription" - template: .bicep/local.bicep - parameters: "region=${{ inputs.REGION }} userId=${{ inputs.USER_ID }}" - failOnStdErr: false - region: ${{ inputs.REGION }} - - - name: Show outputs of deployment - run: | - echo "Resources have been successfully deployed to **${{ steps.bicep.outputs.resourceGroupName }}**." diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 16ba090..7da8990 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,9 +1,9 @@ name: Deploy website to SWA on: - workflow_dispatch: - -# TODO: Configure deployment to automatically run on changes to `Website` project + push: + paths: ["src/Modkit/Website/**"] + branches: ["main"] jobs: deploy: diff --git a/src/Modkit/Website/staticwebapp.config.json b/src/Modkit/Website/staticwebapp.config.json index 040bbfc..90dbeaf 100644 --- a/src/Modkit/Website/staticwebapp.config.json +++ b/src/Modkit/Website/staticwebapp.config.json @@ -1,5 +1,10 @@ { "routes": [ + { + "route": "/discord", + "redirect": "https://discord.gg/SFX3fJZ4NA", + "statusCode": 302 + }, { "route": "/*", "redirect": "https://github.com/leydel/Modkit",