Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/branch-spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
run_install: false

- name: Setup Node
Expand All @@ -33,6 +34,19 @@ jobs:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: PNPM install
run: |
echo; echo "cd to workspace"
Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/branch-validation-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Deploy to Channel Full Refresh

on:
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
branch_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true

env:
SHOULD_DEPLOY: ${{ secrets.OCTOPUSSERVERURL != '' || '' }}
OCTOPUS_URL: ${{ secrets.OCTOPUSSERVERURL }}
OCTOPUS_API_KEY: ${{ secrets.OCTOPUSSERVERAPIKEY }}
OCTOPUS_SPACE: "DevOps Microsite"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: PNPM and Playwright install
run: |
echo; echo "cd to workspace"
cd $GITHUB_WORKSPACE
echo; echo "listing"
ls
echo; echo "NPM install"
pnpm install

- name: Astro build and test
run: |
export NODE_OPTIONS=--max_old_space_size=4096
pnpm dev:img
pnpm test
pnpm crawl

- name: Set Version
run: |
echo "PACKAGE_VERSION=$(date +'%Y.%m.%d').$GITHUB_RUN_NUMBER" >> $GITHUB_ENV

- name: Check output
run: |
echo; echo "cd to workspace"
cd $GITHUB_WORKSPACE
echo; echo "listing"
ls

- name: Create a Zip package 🐙
id: package
uses: OctopusDeploy/create-zip-package-action@v3
with:
package_id: 'DocsMicrosite'
version: "${{ env.PACKAGE_VERSION }}-pullrequest.full"
base_path: "./dist"
output_folder: "./artifacts"
files: |
**/*.*

- name: Push a package to Octopus Deploy 🐙
uses: OctopusDeploy/[email protected]
if: ${{ env.SHOULD_DEPLOY }}
with:
packages: ${{ steps.package.outputs.package_file_path }}

- name: Let people download package
uses: actions/upload-artifact@v4
if: ${{ ! env.SHOULD_DEPLOY }}
with:
name: docs-microsite
path: ${{ steps.package.outputs.package_file_path }}

- name: Push build information to Octopus Deploy 🐙
uses: OctopusDeploy/push-build-information-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
version: "${{ env.PACKAGE_VERSION }}-pullrequest.full"
packages: ${{ steps.package.outputs.package_file_path }}

- name: Create a release in Octopus Deploy 🐙
id: "create_release"
uses: OctopusDeploy/create-release-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
project: "Docs Microsite"
package_version: "${{ env.PACKAGE_VERSION }}-pullrequest.full"
git_ref: ${{ github.ref }}
33 changes: 24 additions & 9 deletions .github/workflows/branch-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
SHOULD_DEPLOY: ${{ secrets.OCTOPUSSERVERURL != '' || '' }}
OCTOPUS_URL: ${{ secrets.OCTOPUSSERVERURL }}
OCTOPUS_API_KEY: ${{ secrets.OCTOPUSSERVERAPIKEY }}
OCTOPUS_SPACE: 'DevOps Microsite'
OCTOPUS_SPACE: "DevOps Microsite"

steps:
- name: Checkout
Expand All @@ -31,6 +31,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
run_install: false

- name: Setup Node
Expand All @@ -40,6 +41,19 @@ jobs:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: PNPM and Playwright install
run: |
echo; echo "cd to workspace"
Expand All @@ -54,7 +68,8 @@ jobs:
export NODE_OPTIONS=--max_old_space_size=4096
pnpm dev:img
pnpm test
node ./src/themes/octopus/utilities/page-report.js
pnpm crawl
pnpm thin

- name: Set Version
run: |
Expand All @@ -72,9 +87,9 @@ jobs:
uses: OctopusDeploy/create-zip-package-action@v3
with:
package_id: 'DocsMicrosite'
version: '${{ env.PACKAGE_VERSION }}-pullrequest'
base_path: './dist'
output_folder: './artifacts'
version: "${{ env.PACKAGE_VERSION }}-pullrequest"
base_path: "./dist"
output_folder: "./artifacts"
files: |
**/*.*

Expand All @@ -95,14 +110,14 @@ jobs:
uses: OctopusDeploy/push-build-information-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
version: '${{ env.PACKAGE_VERSION }}-pullrequest'
version: "${{ env.PACKAGE_VERSION }}-pullrequest"
packages: ${{ steps.package.outputs.package_file_path }}

- name: Create a release in Octopus Deploy 🐙
id: 'create_release'
id: "create_release"
uses: OctopusDeploy/create-release-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
project: 'Docs Microsite'
package_version: '${{ env.PACKAGE_VERSION }}-pullrequest'
project: "Docs Microsite"
package_version: "${{ env.PACKAGE_VERSION }}-pullrequest"
git_ref: ${{ github.ref }}
123 changes: 123 additions & 0 deletions .github/workflows/build-astro-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Deploy Full Refresh

on:
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_and_deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: true

env:
SHOULD_DEPLOY: ${{ secrets.OCTOPUSSERVERURL != '' || '' }}
OCTOPUS_URL: ${{ secrets.OCTOPUSSERVERURL }}
OCTOPUS_API_KEY: ${{ secrets.OCTOPUSSERVERAPIKEY }}
OCTOPUS_SPACE: "DevOps Microsite"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.13.1
run_install: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: PNPM and Playwright install
run: |
echo; echo "cd to workspace"
cd $GITHUB_WORKSPACE
echo; echo "listing"
ls
echo; echo "PNPM install"
pnpm install

- name: Astro build and test
run: |
export NODE_OPTIONS=--max_old_space_size=4096
pnpm dev:img
pnpm test
pnpm crawl

- name: Set Version
run: |
echo "PACKAGE_VERSION=$(date +'%Y.%m.%d').$GITHUB_RUN_NUMBER" >> $GITHUB_ENV

- name: Check output
run: |
echo; echo "cd to workspace"
cd $GITHUB_WORKSPACE
echo; echo "listing"
ls

- name: Create a Zip package 🐙
id: package
uses: OctopusDeploy/create-zip-package-action@v3
with:
package_id: 'DocsMicrosite'
version: "${{ env.PACKAGE_VERSION }}-full"
base_path: "./dist"
output_folder: "./artifacts"
files: |
**/*.*

- name: Push a package to Octopus Deploy 🐙
uses: OctopusDeploy/[email protected]
if: ${{ env.SHOULD_DEPLOY }}
with:
packages: ${{ steps.package.outputs.package_file_path }}

- name: Let people download package
uses: actions/upload-artifact@v4
if: ${{ ! env.SHOULD_DEPLOY }}
with:
name: docs-microsite
path: ${{ steps.package.outputs.package_file_path }}

- name: Push build information to Octopus Deploy 🐙
uses: OctopusDeploy/push-build-information-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
version: "${{ env.PACKAGE_VERSION }}-full"
packages: ${{ steps.package.outputs.package_file_path }}

- name: Create a release in Octopus Deploy 🐙
id: "create_release"
uses: OctopusDeploy/create-release-action@v3
if: ${{ env.SHOULD_DEPLOY }}
with:
project: "Docs Microsite"
package_version: "${{ env.PACKAGE_VERSION }}-full"
git_ref: ${{ github.ref }}
Loading