diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml
index 68254f5..9103abd 100644
--- a/.github/workflows/build-and-deploy-docs.yml
+++ b/.github/workflows/build-and-deploy-docs.yml
@@ -1,15 +1,15 @@
name: Build and Deploy Docs
env:
- DOCS_DEST_DIR: /disqus/
+ DOCS_DEST_DIR: /disqus/v4/
on:
push:
branches:
- - v1
+ - v4
paths:
- 'docs/**'
pull_request:
branches:
- - v1
+ - v4
paths:
- 'docs/**'
workflow_dispatch:
@@ -22,11 +22,11 @@ jobs:
strategy:
fail-fast: true
matrix:
- node-version: [ 14.x ]
+ node-version: [ 20.x ]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
@@ -35,7 +35,7 @@ jobs:
- name: rsync deployments
uses: burnett01/rsync-deployments@4.1
with:
- switches: -avzr --delete
+ switches: -avzr
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml
new file mode 100644
index 0000000..48a8979
--- /dev/null
+++ b/.github/workflows/code-analysis.yaml
@@ -0,0 +1,42 @@
+name: Code Analysis
+
+on:
+ pull_request: null
+ push:
+ branches:
+ - develop-v4
+ workflow_dispatch:
+permissions:
+ contents: read
+jobs:
+ code_analysis:
+ strategy:
+ fail-fast: false
+ matrix:
+ actions:
+ -
+ name: 'PHPStan'
+ run: composer phpstan
+ -
+ name: 'Coding Standards'
+ run: composer fix-cs
+ name: ${{ matrix.actions.name }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Cache Composer dependencies
+ uses: actions/cache@v4
+ with:
+ path: /tmp/composer-cache
+ key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
+ - name: Setup PHP
+ id: setup-php
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.2
+ extensions: 'ctype,curl,dom,iconv,imagick,intl,json,mbstring,openssl,pcre,pdo,reflection,spl,zip'
+ ini-values: post_max_size=256M, max_execution_time=180, memory_limit=512M
+ tools: composer:v2
+ - name: Install Composer dependencies
+ run: composer install --no-interaction --no-ansi --no-progress
+ - run: ${{ matrix.actions.run }}
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
new file mode 100644
index 0000000..8e33492
--- /dev/null
+++ b/.github/workflows/create-release.yml
@@ -0,0 +1,21 @@
+name: Create Release
+run-name: Create release for ${{ github.event.client_payload.version }}
+
+on:
+ repository_dispatch:
+ types:
+ - craftcms/new-release
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: ncipollo/release-action@v1
+ with:
+ body: ${{ github.event.client_payload.notes }}
+ makeLatest: ${{ github.event.client_payload.latest }}
+ name: ${{ github.event.client_payload.version }}
+ prerelease: ${{ github.event.client_payload.prerelease }}
+ tag: ${{ github.event.client_payload.tag }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 508568d..3139335 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Disqus Changelog
+## 4.0.1 - 2024.10.06
+### Added
+* Added a **Lazy Load Disqus** settings option, so you can control whether the Disqus JavaScript is lazily loaded or not ([#8](https://github.com/nystudio107/craft-disqus/issues/8))
+* Added the ability to pass in additional attributes that will be added to the rendered Disqus `