Skip to content

Commit

Permalink
feat!: migrate to nextjs ssg (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorfrye authored Feb 14, 2024
1 parent 1e20e52 commit c6b6712
Show file tree
Hide file tree
Showing 51 changed files with 9,380 additions and 1,516 deletions.
26 changes: 19 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
"name": "DotCom",
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",

// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/powershell": "latest",
"devwasm.azurecr.io/dev-wasm/dev-wasm-feature/dotnet-wasi:0": "latest"
"ghcr.io/devcontainers/features/azure-cli": "latest",
"ghcr.io/devcontainers/features/github-cli": "latest"
},
"forwardPorts": [5139],
"postCreateCommand": "dotnet restore; pwsh",
"shutdownAction": "stopContainer",

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
364 changes: 0 additions & 364 deletions .editorconfig

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
100 changes: 0 additions & 100 deletions .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version: 2
updates:
# Maintain dependencies for Nuget
- package-ecosystem: "nuget"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/azure-swa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ on:
branches: ["main"]

env:
DOTNET_VERSION: '8.x'
APP_PROJECT_FILE: 'src/Client/Client.csproj'
APP_OUTPUT_LOCATION: 'artifacts/client'
NODE_VERSION: '20.x'

jobs:
build_and_deploy_job:
Expand All @@ -24,30 +22,27 @@ jobs:
with:
submodules: true
lfs: false
- name: Set up .NET
uses: actions/setup-dotnet@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install WASM build tools
run: dotnet workload install wasm-tools
- name: Restore dependencies
run: dotnet restore
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Verify formatting
run: dotnet format --verify-no-changes --no-restore
- name: Build solution
run: dotnet build -c Release --no-restore
- name: Publish app project
run: dotnet publish ${{ env.APP_PROJECT_FILE }} -c Release -o ${{ env.APP_OUTPUT_LOCATION }} --no-restore --no-build
run: npm run lint
- name: Build app
run: npm run build
- name: Deploy static web app
id: deploy
uses: Azure/static-web-apps-deploy@v1
env:
SKIP_DEPLOY_ON_MISSING_SECRETS: ${{ github.event_name == 'pull_request' }}
IS_STATIC_EXPORT: true
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_location: '${{ env.APP_OUTPUT_LOCATION }}/wwwroot'
app_location: 'out'
skip_app_build: true
skip_api_build: true

Expand Down
Loading

0 comments on commit c6b6712

Please sign in to comment.