generated from SSWConsulting/SSW.GitHub.Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Redesign SSW Dory landing page & rearchitect to use NextJS and hos…
…ted in Azure Storage (#70) <!-- describe the change, why is it needed and what does it accomplish as per https://ssw.com.au/rules/write-a-good-pull-request/ --> The current tech stack using Jekyll is too restrictive in terms of website design. Moving it over to NextJS and emulating the website design of Code Auditor ![image](https://github.com/SSWConsulting/SSW.Dory/assets/41951199/5331ec13-3217-4ab2-b42b-0f7bd4951cd3) Figure: Code Auditor front page <!-- Add done video, screenshots as per https://ssw.com.au/rules/record-a-quick-and-dirty-done-video/--> ![image](https://github.com/SSWConsulting/SSW.Dory/assets/41951199/c0214b10-6dd5-4b00-8e77-1adcc45de7d7) Figure: redesigned SSW Dory landing page <!-- As per rule https://www.ssw.com.au/rules/over-the-shoulder-prs --> <!-- Getting the PR merged is part of the task - Call someone to review your changes to get them merged ASAP -->
- Loading branch information
Showing
47 changed files
with
810 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build Next.js static site | ||
|
||
on: workflow_call | ||
|
||
# Sets permissions of the GITHUB_TOKEN | ||
permissions: | ||
contents: read | ||
checks: write | ||
id-token: write | ||
|
||
# Set working directory | ||
defaults: | ||
run: | ||
working-directory: ./docs | ||
|
||
jobs: | ||
build-site: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Install dependencies | ||
run: bun install | ||
|
||
- name: Build with Next.js | ||
run: bun run build | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: out | ||
path: ./docs/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CICD Pipeline | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths-ignore: | ||
- .gitignore | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
# deploy-dev: | ||
# uses: .github/workflows/deploy.yml | ||
# with: | ||
# environment: dev | ||
# secrets: inherit | ||
|
||
deploy-prod: | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
environment: prod | ||
secrets: inherit | ||
|
||
build-site: | ||
uses: ./.github/workflows/build-static-site.yml | ||
secrets: inherit | ||
|
||
deploy-site-prod: | ||
uses: ./.github/workflows/deploy-static-site.yml | ||
with: | ||
environment: prod | ||
secrets: inherit | ||
needs: build-site | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Deploy Next.js static site | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: "Name of the environment to deploy to" | ||
required: true | ||
type: string | ||
|
||
# Sets permissions of the GITHUB_TOKEN | ||
permissions: | ||
id-token: write | ||
contents: read | ||
checks: write | ||
|
||
jobs: | ||
deploy-site: | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
|
||
env: | ||
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP}} | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
TENANT_ID: ${{ secrets.TENANT_ID }} | ||
SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }} | ||
|
||
steps: | ||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ env.CLIENT_ID }} | ||
tenant-id: ${{ env.TENANT_ID }} | ||
subscription-id: ${{ env.SUBSCRIPTION_ID }} | ||
|
||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: out | ||
|
||
- name: Clean out old assets in Azure | ||
run: | | ||
az storage blob delete-batch --account-name sswdory -s '$web' | ||
- name: Upload new assets to Azure | ||
run: | | ||
az storage blob upload-batch --overwrite true --account-name sswdory -d '$web' -s . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: "Name of the environment to deploy to" | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
checks: write | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
deploy-bicep: | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
|
||
env: | ||
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP}} | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
TENANT_ID: ${{ secrets.TENANT_ID }} | ||
SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }} | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ env.CLIENT_ID }} | ||
tenant-id: ${{ env.TENANT_ID }} | ||
subscription-id: ${{ env.SUBSCRIPTION_ID }} | ||
|
||
- name: Validate Bicep | ||
uses: azure/arm-deploy@v1 | ||
with: | ||
failOnStdErr: false | ||
template: infra/deploy.bicep | ||
resourceGroupName: ${{env.AZURE_RESOURCE_GROUP}} | ||
subscriptionId: ${{secrets.SUBSCRIPTION_ID}} | ||
additionalArguments: "--what-if" | ||
parameters: > | ||
projectName=SSW.Dory | ||
- name: Deploy Bicep | ||
uses: azure/arm-deploy@v1 | ||
with: | ||
failOnStdErr: false | ||
template: infra/deploy.bicep | ||
resourceGroupName: ${{env.AZURE_RESOURCE_GROUP}} | ||
subscriptionId: ${{secrets.SUBSCRIPTION_ID}} | ||
parameters: > | ||
projectName=SSW.Dory | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/ruby | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=ruby | ||
|
||
### Ruby ### | ||
*.gem | ||
*.rbc | ||
/.config | ||
/coverage/ | ||
/InstalledFiles | ||
/pkg/ | ||
/spec/reports/ | ||
/spec/examples.txt | ||
/test/tmp/ | ||
/test/version_tmp/ | ||
/tmp/ | ||
|
||
# Used by dotenv library to load environment variables. | ||
# .env | ||
|
||
# Ignore Byebug command history file. | ||
.byebug_history | ||
|
||
## Specific to RubyMotion: | ||
.dat* | ||
.repl_history | ||
build/ | ||
*.bridgesupport | ||
build-iPhoneOS/ | ||
build-iPhoneSimulator/ | ||
|
||
## Specific to RubyMotion (use of CocoaPods): | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# vendor/Pods/ | ||
|
||
## Documentation cache and generated files: | ||
/.yardoc/ | ||
/_yardoc/ | ||
/doc/ | ||
/rdoc/ | ||
|
||
## Environment normalization: | ||
/.bundle/ | ||
/vendor/bundle | ||
/lib/bundler/man/ | ||
|
||
# for a library or gem, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# Gemfile.lock | ||
# .ruby-version | ||
# .ruby-gemset | ||
|
||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | ||
.rvmrc | ||
|
||
# Used by RuboCop. Remote config files pulled in from inherit_from directive. | ||
# .rubocop-https?--* | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/ruby | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
# Ignore metadata generated by Jekyll | ||
_site/ | ||
.sass-cache/ | ||
.jekyll-cache/ | ||
.jekyll-metadata | ||
|
||
# Ignore folders generated by Bundler | ||
.bundle/ | ||
vendor/ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
Oops, something went wrong.