Skip to content

Commit

Permalink
PR theming - customize-dark-colors (#52)
Browse files Browse the repository at this point in the history
* customize dark colors

* chore

* add new color  section

* update cdn dest folder

* fix hidden on dark default behavior

* update theme switer behavior

---------

Co-authored-by: medevod <medevod@github.com>
  • Loading branch information
medevod and medevod authored Apr 10, 2024
1 parent 0ce950b commit 778472b
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 5,130 deletions.
107 changes: 53 additions & 54 deletions .github/workflows/azure-static-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: CI
env:
AZURE_STORAGE_SERVICE_ENDPOINT: https://stevodocs.blob.core.windows.net/
AZURE_STORAGE_AUTH_MODE: login
AZURE_STORAGE_AUTH_MODE: login
on:
push:
tags:
Expand All @@ -13,16 +13,16 @@ on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
- master
jobs:
# deploy pullrequest version of demo site
deploy_pullrequest:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
if: github.event_name == 'pull_request' && github.event.action != 'closed'
runs-on: ubuntu-latest
name: build and deploy PR version
permissions:
contents: read
id-token: write
contents: read
id-token: write
steps:
- name: "Checkout Github Action"
uses: actions/checkout@master
Expand All @@ -32,45 +32,45 @@ jobs:
node-version: "18.x"
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: "build minified main css library, js plugins and demo in standalone mode"
env:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
run: |
npm install
npm run build
npm run build_demo
npm run test --if-present
npm run test --if-present
- name: azure login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: deploy demo app to Azure static website
uses: azure/CLI@v1
env:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
ACCOUNT_NAME: stevodocs
DEMO_ROOT_DIR : "$web"
DEMO_SOURCE_DIR : demo_build
DEMO_DEST_DIR : "$web/mgplus/beta"
DIST_SOURCE_DIR : dist
DIST_DEST_DIR : "$web/mgplus/dist/v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
uses: azure/CLI@v1
env:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
ACCOUNT_NAME: stevodocs
DEMO_ROOT_DIR: "$web"
DEMO_SOURCE_DIR: demo_build
DEMO_DEST_DIR: "$web/mgplus/beta"
DIST_SOURCE_DIR: dist
DIST_DEST_DIR: "mgpluscdn/v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
with:
azcliversion: 2.30.0
inlineScript: |
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
deploy_preview:
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: build and deploy preview version
permissions:
contents: read
id-token: write
contents: read
id-token: write
steps:
- name: "Checkout Github Action"
uses: actions/checkout@master
Expand All @@ -88,35 +88,35 @@ jobs:
npm install
npm run build
npm run build_demo
npm run test --if-present
npm run test --if-present
- name: azure login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: deploy demo site to Azure static website
uses: azure/CLI@v1
env:
ACCOUNT_NAME: stevodocs
DEMO_SOURCE_DIR : demo_build
DEMO_DEST_DIR : "$web/mgplus/preview"
DIST_SOURCE_DIR : dist
DIST_DEST_DIR : "$web/mgplus/dist/v${{ steps.package-version.outputs.current-version}}-preview"
uses: azure/CLI@v1
env:
ACCOUNT_NAME: stevodocs
DEMO_SOURCE_DIR: demo_build
DEMO_DEST_DIR: "$web/mgplus/preview"
DIST_SOURCE_DIR: dist
DIST_DEST_DIR: "mgpluscdn/v${{ steps.package-version.outputs.current-version}}-preview"
with:
azcliversion: 2.30.0
azcliversion: 2.30.0
inlineScript: |
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
deploy_release:
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
deploy_release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: build and deploy release version
permissions:
contents: read
id-token: write
contents: read
id-token: write
steps:
- name: "Checkout Github Action"
uses: actions/checkout@master
Expand All @@ -128,35 +128,34 @@ jobs:
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: "build-library"
if : ${{ env.RELEASE_VERSION }} == "v${{ steps.package-version.outputs.current-version}}"
if: ${{ env.RELEASE_VERSION }} == "v${{ steps.package-version.outputs.current-version}}"
env:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}"
run: |
npm install
npm run build
npm run build_demo
npm run test --if-present
- name: azure login
npm run test --if-present
- name: azure login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: deploy demo site to Azure static website
uses: azure/CLI@v1
env:
uses: azure/CLI@v1
env:
ACCOUNT_NAME: stevodocs
DEMO_SOURCE_DIR : demo_build
DEMO_DEST_DIR : "$web/mgplus"
DIST_SOURCE_DIR : dist
DIST_DEST_DIR : "$web/mgplus/dist/v${{ steps.package-version.outputs.current-version}}"
DEMO_SOURCE_DIR: demo_build
DEMO_DEST_DIR: "$web/mgplus"
DIST_SOURCE_DIR: dist
DIST_DEST_DIR: "mgpluscdn/v${{ steps.package-version.outputs.current-version}}"
with:
azcliversion: 2.30.0
azcliversion: 2.30.0
inlineScript: |
az extension add -n storage-preview -y
az storage blob upload-batch -s $DEMO_SOURCE_DIR -d $DEMO_DEST_DIR --account-name $ACCOUNT_NAME
az storage blob upload-batch -s $DIST_SOURCE_DIR -d $DIST_DEST_DIR --account-name $ACCOUNT_NAME
Loading

0 comments on commit 778472b

Please sign in to comment.