Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
38 changes: 38 additions & 0 deletions .github/workflows/deploy-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Develop

env:
APP_LOCATION: ''
OUTPUT_LOCATION: 'packages/website/build'

on:
push:
branches: [main]

permissions:
contents: read

jobs:
deploy-dev:
runs-on: ubuntu-latest
name: Deploy to Dev Environment
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

- name: Deploy to Development
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_DEV_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
output_location: ${{ env.OUTPUT_LOCATION }}
app_location: ${{ env.APP_LOCATION }}
app_build_command: 'pnpm website build'
action: 'upload'
skip_api_build: true
deployment_environment: 'dev'
env:
CUSTOM_BUILD_COMMAND: corepack enable && corepack prepare pnpm@10.9.0 --activate && pnpm install --frozen-lockfile && pnpm ui build && pnpm website build
Copy link
Contributor

@librowski-synergy librowski-synergy Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, could you change the
corepack enable && corepack prepare pnpm@10.9.0 --activate
to
npm i -g corepack@latest && corepack prepare here and in other occurences?

It'd bulletproof the solution for upcoming versions of node that won't bundle corepack and on top of that it'd install pnpm with proper version taken from packageManager field in package.json.

ENABLE_NODE_MONOREPO_BUILD: true
NODE_VERSION: 22
77 changes: 0 additions & 77 deletions .github/workflows/deploy-docs.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Deploy Production

env:
APP_LOCATION: ''
OUTPUT_LOCATION: 'packages/website/build'

on:
push:
branches: ['release/*']

permissions:
contents: read

jobs:
deploy-production:
runs-on: ubuntu-latest
name: Deploy to Production
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable

- name: Install pnpm
run: corepack prepare pnpm@10.9.0 --activate

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build UI Package
run: pnpm ui build

- name: Build Documentation
run: pnpm website build

- name: Check if version changed
id: version-check
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
PUBLISHED_VERSION=$(npm view @axiomhq/axiom-ui-components version 2>/dev/null || echo "0.0.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axiomhq/axiom-ui-components -> @synergycodes/axiom :)

echo "current-version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "published-version=$PUBLISHED_VERSION" >> $GITHUB_OUTPUT
if [ "$CURRENT_VERSION" != "$PUBLISHED_VERSION" ]; then
echo "version-changed=true" >> $GITHUB_OUTPUT
echo "Version changed from $PUBLISHED_VERSION to $CURRENT_VERSION"
else
echo "version-changed=false" >> $GITHUB_OUTPUT
echo "Version unchanged: $CURRENT_VERSION"
fi

- name: Publish NPM Package
if: steps.version-check.outputs.version-changed == 'true'
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy Documentation to Production
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_PROD_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
output_location: ${{ env.OUTPUT_LOCATION }}
app_location: ${{ env.APP_LOCATION }}
app_build_command: 'pnpm website build'
action: 'upload'
skip_api_build: true
deployment_environment: 'release'
env:
CUSTOM_BUILD_COMMAND: corepack enable && corepack prepare pnpm@10.9.0 --activate && pnpm install --frozen-lockfile && pnpm ui build && pnpm website build
ENABLE_NODE_MONOREPO_BUILD: true
NODE_VERSION: 22
68 changes: 0 additions & 68 deletions .github/workflows/npm-publish.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Validate PR

env:
APP_LOCATION: ''
OUTPUT_LOCATION: 'packages/website/build'

on:
pull_request:
branches: [main, 'release/*']

permissions:
contents: read
pull-requests: write

jobs:
validate:
runs-on: ubuntu-latest
name: Validate PR
env:
ENABLE_NODE_MONOREPO_BUILD: true
NODE_VERSION: 22
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable Corepack
run: corepack enable

- name: Install pnpm
run: corepack prepare pnpm@10.9.0 --activate

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build UI Package
run: pnpm ui build

- name: Build Documentation
run: pnpm website build

- name: Run Quality Checks
run: |
pnpm lint:fix
pnpm format
pnpm typecheck
pnpm file-lint