diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 581e554..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/build-static-site.yml b/.github/workflows/build-static-site.yml new file mode 100644 index 0000000..64eb171 --- /dev/null +++ b/.github/workflows/build-static-site.yml @@ -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 diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..3d91288 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -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 + \ No newline at end of file diff --git a/.github/workflows/deploy-static-site.yml b/.github/workflows/deploy-static-site.yml new file mode 100644 index 0000000..9564737 --- /dev/null +++ b/.github/workflows/deploy-static-site.yml @@ -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 . \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c0e723e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 + + + + + + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9c09f1f..496ee2c 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/Gemfile b/Gemfile deleted file mode 100644 index aea06e6..0000000 --- a/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -# gem "rails" - -gem "jekyll", "~> 4.3" diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 83b8245..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,70 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - colorator (1.1.0) - concurrent-ruby (1.2.2) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - eventmachine (1.2.7) - ffi (1.15.5) - forwardable-extended (2.6.0) - google-protobuf (3.24.1-arm64-darwin) - http_parser.rb (0.8.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - jekyll (4.3.2) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 1.0) - jekyll-sass-converter (>= 2.0, < 4.0) - jekyll-watch (~> 2.0) - kramdown (~> 2.3, >= 2.3.1) - kramdown-parser-gfm (~> 1.0) - liquid (~> 4.0) - mercenary (>= 0.3.6, < 0.5) - pathutil (~> 0.9) - rouge (>= 3.0, < 5.0) - safe_yaml (~> 1.0) - terminal-table (>= 1.8, < 4.0) - webrick (~> 1.7) - jekyll-sass-converter (3.0.0) - sass-embedded (~> 1.54) - jekyll-watch (2.2.1) - listen (~> 3.0) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.8.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.4.0) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (5.0.3) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) - rexml (3.2.6) - rouge (4.1.3) - safe_yaml (1.0.5) - sass-embedded (1.66.1-arm64-darwin) - google-protobuf (~> 3.23) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - unicode-display_width (2.4.2) - webrick (1.8.1) - -PLATFORMS - arm64-darwin-22 - -DEPENDENCIES - jekyll (~> 4.3) - -BUNDLED WITH - 2.4.10 diff --git a/README.md b/README.md index 29a210a..80fe014 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,4 @@ SSW.Dory is a solution to keep track of SharePoint files that have been checked ## Architecture Diagram -![SSW Dory architecture diagram](./docs/assets/img/dory-architecture-diagram.png) - -The solution is developed in Power Automate. -![Overview of SSW Dory Power Automate solution](./docs/assets/img/dory-power-automate-overview.png) +![SSW Dory architecture diagram](./docs/public/dory-architecture-diagram.svg) diff --git a/docs/.DS_Store b/docs/.DS_Store deleted file mode 100644 index 2d8bc10..0000000 Binary files a/docs/.DS_Store and /dev/null differ diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/docs/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/docs/.gitignore b/docs/.gitignore index fa56d71..8f322f0 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,9 +1,35 @@ -# Ignore metadata generated by Jekyll -_site/ -.sass-cache/ -.jekyll-cache/ -.jekyll-metadata - -# Ignore folders generated by Bundler -.bundle/ -vendor/ \ No newline at end of file +# 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 diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 086a5c9..0000000 --- a/docs/404.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -permalink: /404.html -layout: default ---- - - - -
-

404

- -

Page not found :(

-

The requested page could not be found.

-
diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 01884b4..0000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -sswdory.com \ No newline at end of file diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 0b3cd48..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,35 +0,0 @@ -source "https://rubygems.org" -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! -# gem "jekyll", "~> 4.3.2" -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima", "~> 2.5" -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "github-pages", "~> 228", group: :jekyll_plugins -# If you have any plugins, put them here! -group :jekyll_plugins do - gem "jekyll-feed", "~> 0.12" -end - -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. -platforms :mingw, :x64_mingw, :mswin, :jruby do - gem "tzinfo", ">= 1", "< 3" - gem "tzinfo-data" -end - -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] - -# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem -# do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - -gem "webrick", "~> 1.8" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock deleted file mode 100644 index b4231f4..0000000 --- a/docs/Gemfile.lock +++ /dev/null @@ -1,266 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (7.0.7.2) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.11.1) - colorator (1.1.0) - commonmarker (0.23.10) - concurrent-ruby (1.2.2) - dnsruby (1.70.0) - simpleidn (~> 0.2.1) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.16.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - execjs (2.8.1) - faraday (2.7.10) - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - ffi (1.15.5) - forwardable-extended (2.6.0) - gemoji (3.0.1) - github-pages (228) - github-pages-health-check (= 1.17.9) - jekyll (= 3.9.3) - jekyll-avatar (= 0.7.0) - jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.4.0) - jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.15.1) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.13.0) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.12.0) - kramdown (= 2.3.2) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.4) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.13.6, < 2.0) - rouge (= 3.26.0) - terminal-table (~> 1.4) - github-pages-health-check (1.17.9) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (~> 4.0) - public_suffix (>= 3.0, < 5.0) - typhoeus (~> 1.3) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.8.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - jekyll (3.9.3) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (>= 0.7, < 2) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-avatar (0.7.0) - jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.1.1) - coffee-script (~> 2.2) - coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.4.0) - commonmarker (~> 0.23.7) - jekyll (~> 3.9.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 5.0) - jekyll-default-layout (0.1.4) - jekyll (~> 3.0) - jekyll-feed (0.15.1) - jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.13.0) - jekyll (>= 3.4, < 5.0) - octokit (~> 4.0, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.12.0) - gemoji (~> 3.0) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - kramdown (2.3.2) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.8.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (5.19.0) - nokogiri (1.15.4-arm64-darwin) - racc (~> 1.4) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (4.0.7) - racc (1.7.1) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) - rexml (3.2.6) - rouge (3.26.0) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - simpleidn (0.2.1) - unf (~> 0.1.4) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - typhoeus (1.4.0) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (1.8.0) - webrick (1.8.1) - -PLATFORMS - arm64-darwin-22 - -DEPENDENCIES - github-pages (~> 228) - http_parser.rb (~> 0.6.0) - jekyll-feed (~> 0.12) - minima (~> 2.5) - tzinfo (>= 1, < 3) - tzinfo-data - wdm (~> 0.1.1) - webrick (~> 1.8) - -BUNDLED WITH - 2.4.10 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..2f12782 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,26 @@ +# SSW.Dory Landing Page + +## Architecture Overview +[Add Architecture Diagram] + +## Get Started + +Install the project's dependencies: + +```bash +bun install +``` + +Run the project locally: + +```bash +bun run dev +``` + +Build the project: +```bash +bun run build +``` + +## Local URLs +[http://localhost:8080/](http://localhost:8080/): browse the website diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 6a4f5cb..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely edit after that. If you find -# yourself editing this file very often, consider using Jekyll's data files -# feature for the data you need to update frequently. -# -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'bundle exec jekyll serve'. If you change this file, please restart the server process. -# -# If you need help with YAML syntax, here are some quick references for you: -# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml -# https://learnxinyminutes.com/docs/yaml/ -# -# Site settings -# These are used to personalize your new site. If you look in the HTML files, -# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. -# You can create any custom variable you would like, and they will be accessible -# in the templates via {{ site.myvariable }}. - -title: SSW Dory -description: >- # this means to ignore newlines until "baseurl:" - A low-code solution to automatically remind users to check-in their SharePoint files or merge their open GitHub Pull Requests. -baseurl: "" # the subpath of your site, e.g. /blog -url: "https://sswdory.com" # the base hostname & protocol for your site, e.g. http://example.com - -# Build settings -theme: jekyll-theme-tactile -plugins: - - jekyll-feed - -# Exclude from processing. -# The following items will not be processed, by default. -# Any item listed under the `exclude:` key here will be automatically added to -# the internal "default list". -# -# Excluded items can be processed by explicitly listing the directories or -# their entries' file path in the `include:` list. -# -# exclude: -# - .sass-cache/ -# - .jekyll-cache/ -# - gemfiles/ -# - Gemfile -# - Gemfile.lock -# - node_modules/ -# - vendor/bundle/ -# - vendor/cache/ -# - vendor/gems/ -# - vendor/ruby/ diff --git a/docs/assets/.DS_Store b/docs/assets/.DS_Store deleted file mode 100644 index 048902d..0000000 Binary files a/docs/assets/.DS_Store and /dev/null differ diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss deleted file mode 100644 index 9b1dc92..0000000 --- a/docs/assets/css/style.scss +++ /dev/null @@ -1,36 +0,0 @@ ---- ---- - -@import "{{ site.theme }}"; -@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap'); - -body { - color: #333333; - font-family: "Open Sans", Arial, Helvetica, sans-serif; -} - -a { - color: #CC4141; -} - -header h1 { - color: #333333; - font-family: "Open Sans", Arial, Helvetica, sans-serif; - display: flex; - justify-content: center; -} - -a.button { - color: #CC4141; -} - -h2, -h4, -h5, -h6 { - color: #333333; -} - -h3 { - color: #CC4141; -} \ No newline at end of file diff --git a/docs/assets/img/dory-architecture-diagram.png b/docs/assets/img/dory-architecture-diagram.png deleted file mode 100644 index b94cce7..0000000 Binary files a/docs/assets/img/dory-architecture-diagram.png and /dev/null differ diff --git a/docs/assets/img/dory-power-automate-overview.png b/docs/assets/img/dory-power-automate-overview.png deleted file mode 100644 index 23d39a1..0000000 Binary files a/docs/assets/img/dory-power-automate-overview.png and /dev/null differ diff --git a/docs/assets/img/dory-power-automate.png b/docs/assets/img/dory-power-automate.png deleted file mode 100644 index 8183f69..0000000 Binary files a/docs/assets/img/dory-power-automate.png and /dev/null differ diff --git a/docs/assets/img/email-sharepoint.png b/docs/assets/img/email-sharepoint.png deleted file mode 100644 index a204324..0000000 Binary files a/docs/assets/img/email-sharepoint.png and /dev/null differ diff --git a/docs/bun.lockb b/docs/bun.lockb new file mode 100755 index 0000000..2225241 Binary files /dev/null and b/docs/bun.lockb differ diff --git a/docs/index.markdown b/docs/index.markdown deleted file mode 100644 index 8b36510..0000000 --- a/docs/index.markdown +++ /dev/null @@ -1,30 +0,0 @@ ---- -# Feel free to add content and custom Front Matter to this file. -# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults - -layout: default -title: SSW Dory Logo ---- -![Email SharePoint](./assets/img/email-sharepoint.png) -***Figure: Example email sent out to remind users to check in their SharePoint files*** - -![Email GitHub](./assets/img/email-github.png) -***Figure: Example email sent out to remind users to merge their open GitHub PRs*** - -# How it works - -### Powered by Microsoft Power Automate -![SSW.Dory Power Automate flow](./assets/img/dory-architecture-diagram.png) -SSW Dory is a low-code solution developed in Power Automate. Each morning, the SSW Dory flow is triggered and run. It goes out and looks for SharePoint files that have not yet been checked back in or GitHub pull requests that have not yet been merged. It then consolidates this information into a single SharePoint list for anyone to view and sends off email reminders to the relevent people. - -### Discover checked-out SharePoint pages -![Checked out SharePoint file](./assets/img/old-sharepoint.png) -SSW Dory uses the native SharePoint connection in Power Automate to find checked-out files in your SharePoint site. - -### Identify long-pending GitHub pull requests -![Stale GitHub PR](./assets/img/old-github.png) -SSW Dory uses the GitHub API to look for open Pull Requests in your GitHub repos. It then filters them out for ones that have been open for longer than a certain period of time e.g., one day. - -### Consolidate these potential blockers into a dedicated SharePoint list -![Sharepoint list](./assets/img/sharepoint-list.png) -A SharePoint list can be set up for SSW Dory to populate. This list can be used to view all outstanding tasks, or only the ones you need to action. \ No newline at end of file diff --git a/docs/next.config.js b/docs/next.config.js new file mode 100644 index 0000000..8d7f01b --- /dev/null +++ b/docs/next.config.js @@ -0,0 +1,9 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: "export", + images: { + unoptimized: true, + }, +}; + +module.exports = nextConfig; diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..aeaf66b --- /dev/null +++ b/docs/package.json @@ -0,0 +1,33 @@ +{ + "name": "docs", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "bun run build && bun run start", + "build": "next build", + "start": "http-server ./out", + "lint": "next lint" + }, + "dependencies": { + "@fortawesome/fontawesome-svg-core": "^6.4.2", + "@fortawesome/free-brands-svg-icons": "^6.4.2", + "@fortawesome/free-solid-svg-icons": "^6.4.2", + "@fortawesome/react-fontawesome": "^0.2.0", + "@types/node": "20.6.0", + "@types/react": "18.2.21", + "@types/react-dom": "18.2.7", + "autoprefixer": "10.4.15", + "eslint": "8.49.0", + "eslint-config-next": "13.4.19", + "next": "13.4.19", + "postcss": "8.4.29", + "react": "18.2.0", + "react-dom": "18.2.0", + "tailwindcss": "3.3.3", + "typescript": "5.2.2" + }, + "devDependencies": { + "bun-types": "^1.0.1", + "http-server": "^14.1.1" + } +} diff --git a/docs/postcss.config.js b/docs/postcss.config.js new file mode 100644 index 0000000..7489255 --- /dev/null +++ b/docs/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + 'tailwindcss/nesting': {}, + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/docs/assets/img/SSWDory Architect Diagram.drawio b/docs/public/SSWDory Architect Diagram.drawio similarity index 100% rename from docs/assets/img/SSWDory Architect Diagram.drawio rename to docs/public/SSWDory Architect Diagram.drawio diff --git a/docs/public/dory-architecture-diagram.svg b/docs/public/dory-architecture-diagram.svg new file mode 100644 index 0000000..9716ab0 --- /dev/null +++ b/docs/public/dory-architecture-diagram.svg @@ -0,0 +1,4 @@ + + + +
trigger flow
trigger flow



Power Automate
(SSW.Dory)
Power Automate...




Outlook
Outlook...




SSWDory SharePoint Site
SSWDory SharePoint Si...
E.g., 1 day
E.g., 1 day
https://github.com/SSWConsulting/SSW.Dory
https://github.com/SSWConsulting/SSW.Dory






User
User...




Power Automate
(SSW.Dory.Emailing)
Power Automate...
send emails
send emails
read action items
read action items
read emails
read emails
write new action items
write new action items
view action items
view action items




GitHub
GitHub...




SharePoint
SharePoint...
Data Sources
Data Sources



Power Automate
(SSW.Dory.Sharepoint)
Power Automate...
checked-out pages
checked-out pages



Power Automate
(SSW.Dory.GitHub)
Power Automate...
stale pull requests
stale pull requests
trigger flow
trigger flow
1
1
2
2
3
3
Architecture Diagram
Architecture Diagram
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/assets/img/email-github.png b/docs/public/email-github.png similarity index 100% rename from docs/assets/img/email-github.png rename to docs/public/email-github.png diff --git a/docs/public/github-mark.svg b/docs/public/github-mark.svg new file mode 100644 index 0000000..37fa923 --- /dev/null +++ b/docs/public/github-mark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/img/old-github.png b/docs/public/old-github.png similarity index 100% rename from docs/assets/img/old-github.png rename to docs/public/old-github.png diff --git a/docs/assets/img/old-sharepoint.png b/docs/public/old-sharepoint.png similarity index 100% rename from docs/assets/img/old-sharepoint.png rename to docs/public/old-sharepoint.png diff --git a/docs/assets/img/sharepoint-list.png b/docs/public/sharepoint-list.png similarity index 100% rename from docs/assets/img/sharepoint-list.png rename to docs/public/sharepoint-list.png diff --git a/docs/assets/img/sswdory-logo.png b/docs/public/sswdory-logo.png similarity index 100% rename from docs/assets/img/sswdory-logo.png rename to docs/public/sswdory-logo.png diff --git a/docs/favicon.ico b/docs/src/app/favicon.ico similarity index 100% rename from docs/favicon.ico rename to docs/src/app/favicon.ico diff --git a/docs/src/app/footer.tsx b/docs/src/app/footer.tsx new file mode 100644 index 0000000..044bccf --- /dev/null +++ b/docs/src/app/footer.tsx @@ -0,0 +1,155 @@ +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faHeart } from "@fortawesome/free-solid-svg-icons"; +import { + faFacebook, + faGithub, + faInstagram, + faLinkedin, + faTwitter, + faTiktok, + faYoutube, +} from "@fortawesome/free-brands-svg-icons"; + +export default function Footer() { + return ( + <> +
+
+ We open + source. Powered by{" "} + + GitHub + +
+
+ + + ); +} diff --git a/docs/src/app/globals.css b/docs/src/app/globals.css new file mode 100644 index 0000000..b55bc55 --- /dev/null +++ b/docs/src/app/globals.css @@ -0,0 +1,75 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +*, ::before, ::after { + border-style: none; +} + +html { + font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif +} + +body { + color: rgb(var(--foreground-rgb)); +} + +.bggrey { + background-color: #e9e9e9; +} + +.bordered { + border: 10px solid #eee; + outline: 1px solid #ccc; +} + +.main-container { + margin-left: auto; + margin-right: auto; + max-width: 1280px; +} + +.bg-grey-translucent { + background-color: hsla(0, 0%, 40%, 0.1); +} + +.text-ssw-red { + --tw-text-opacity: 1; + color: rgb(204 65 65 / var(--tw-text-opacity)); +} + +a.footer-link,a.footer-link:visited { + @apply text-white; + line-height: .75rem; + transition: all 0.3s ease-in-out; + &:hover { + @apply text-ssw-red; + } +} + +a.footer-greybar-link, a.footer-greybar-link:hover { + text-decoration: underline; +} + +footer { + color: #9e9e9e; + font-size: 0.75rem; +} + +.social-media-icon { + color: #fff; + display: block; + float: right; + height: 25px; + text-decoration: none; + text-align: center; + width: 25px; + margin-left: 8px; + line-height: 25px; +} diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx new file mode 100644 index 0000000..66064ab --- /dev/null +++ b/docs/src/app/layout.tsx @@ -0,0 +1,25 @@ +import './globals.css' +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' +import { config } from '@fortawesome/fontawesome-svg-core' +import '@fortawesome/fontawesome-svg-core/styles.css' +config.autoAddCss = false + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'SSW Dory', + description: 'A low-code solution to automatically remind users to check-in their SharePoint pages or merge their open GitHub Pull Requests', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/docs/src/app/marketingCard.tsx b/docs/src/app/marketingCard.tsx new file mode 100644 index 0000000..1801ac3 --- /dev/null +++ b/docs/src/app/marketingCard.tsx @@ -0,0 +1,55 @@ +import Image from "next/image"; + +type MarketingCardTextProps = { + title: string; + description: string; +}; + +type MarketingCardProps = { + title: string; + description: string; + imgURL: string; + reverse?: boolean; +}; + +function MarketingCardText({ title, description }: MarketingCardTextProps) { + return ( +
+

+ {title} +

+

{description}

+
+ ); +} + +export default function MarketingCard({ + title, + description, + imgURL, + reverse, +}: MarketingCardProps) { + return ( +
+
+ {!reverse && ( + + )} +
+ + hero + +
+ {reverse && ( + + )} +
+
+ ); +} diff --git a/docs/src/app/page.tsx b/docs/src/app/page.tsx new file mode 100644 index 0000000..2721d8b --- /dev/null +++ b/docs/src/app/page.tsx @@ -0,0 +1,74 @@ +import Image from "next/image"; +import MarketingCard from "./marketingCard"; +import Footer from "./footer"; + +export default function Home() { + return ( +
+ +
+
+
+
+

+ Check out our Github +

+
+ + Invertocat Logo + +
+
+ + + + + + + + + + +
+
+ ); +} diff --git a/docs/tailwind.config.ts b/docs/tailwind.config.ts new file mode 100644 index 0000000..1af3b8f --- /dev/null +++ b/docs/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from 'tailwindcss' + +const config: Config = { + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + }, + }, + }, + plugins: [], +} +export default config diff --git a/docs/tsconfig.json b/docs/tsconfig.json new file mode 100644 index 0000000..f44e4d8 --- /dev/null +++ b/docs/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + }, + "types": ["bun-types"] + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/infra/StaticSiteStorage.bicep b/infra/StaticSiteStorage.bicep new file mode 100644 index 0000000..b0389c6 --- /dev/null +++ b/infra/StaticSiteStorage.bicep @@ -0,0 +1,55 @@ + +@minLength(3) +@maxLength(21) +param appName string + +param location string + +@allowed([ + 'Standard_LRS' + 'Standard_GRS' + 'Standard_ZRS' + 'Standard_RAGRS' +]) +param skuName string = 'Standard_LRS' + +// ADD WHEN WE HAVE A CUSTOM DOMAIN NAME + +@description('Resource tags for organizing / cost monitoring') +param tags object + + + + +resource staticSiteStorage 'Microsoft.Storage/storageAccounts@2019-06-01' = { + name: replace(replace(replace(toLower(take('${appName}', 24)), '-', ''), '_', ''),'.','') + location: location + kind: 'StorageV2' + tags: tags + sku: { + name: skuName + } + properties: { + minimumTlsVersion: 'TLS1_2' + accessTier: 'Hot' + allowBlobPublicAccess: false + networkAcls: { + bypass: 'AzureServices' + defaultAction: 'Allow' + } + supportsHttpsTrafficOnly: true + } +} + + + +resource webContainer 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-06-01' = { + name: '${staticSiteStorage.name}/default/$web' + properties: { + publicAccess: 'None' + } +} + + + +output websiteStorageAccountName string = staticSiteStorage.name diff --git a/infra/deploy.bicep b/infra/deploy.bicep new file mode 100644 index 0000000..52c0886 --- /dev/null +++ b/infra/deploy.bicep @@ -0,0 +1,18 @@ + +param projectName string +param lastDeploymentDate string = utcNow() +param tags object = { + Deployed:'yes' +} + +param location string = 'australiaeast' + +module staticSiteStorage 'StaticSiteStorage.bicep' = { + name: '${projectName}-static-site-${lastDeploymentDate}' + scope: resourceGroup() + params: { + appName: projectName + location: location + tags: tags + } +}