Skip to content
Open
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
50 changes: 50 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Website to Zephyr

on:
push:
branches: [main]
workflow_dispatch:

permissions: {}

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

jobs:
deploy:
if: github.repository == 'rstackjs/rstack-cli' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.21.0
package-manager-cache: false

- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
run_install: true

- name: Verify Zephyr token
env:
ZE_CI_TOKEN: ${{ secrets.ZE_CI_TOKEN }}
run: test -n "$ZE_CI_TOKEN" || { echo '::error::Set repository secret ZE_CI_TOKEN.'; exit 1; }

- name: Build workspace packages
run: pnpm build

- name: Build and deploy website
env:
ZE_CI_TOKEN: ${{ secrets.ZE_CI_TOKEN }}
ZE_FAIL_BUILD: true
run: pnpm --filter rstack-website build
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
name: Release
if: github.repository == 'rstackjs/rstack-cli' && github.event_name == 'workflow_dispatch'
needs: native
outputs:
sha: ${{ steps.source.outputs.sha }}
runs-on: ubuntu-latest
environment: npm
permissions:
Expand All @@ -68,6 +70,10 @@ jobs:
with:
fetch-depth: 1

- name: Record release source
id: source
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
Expand Down Expand Up @@ -100,3 +106,44 @@ jobs:
run: |
pnpm --dir packages/rstack/npm -r publish --tag "$NPM_TAG" --no-git-checks
pnpm --filter './packages/*' -r stage publish --tag "$NPM_TAG" --no-git-checks

deploy-website:
name: Deploy website to production
if: inputs.npm_tag == 'latest'
needs: release
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
ref: ${{ needs.release.outputs.sha }}

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.21.0
package-manager-cache: false

- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
run_install: true

- name: Verify Zephyr token
env:
ZE_CI_TOKEN: ${{ secrets.ZE_CI_TOKEN }}
run: test -n "$ZE_CI_TOKEN" || { echo '::error::Set repository secret ZE_CI_TOKEN.'; exit 1; }

- name: Build workspace packages
run: pnpm build

- name: Build and deploy website to production
env:
ZE_CI_TOKEN: ${{ secrets.ZE_CI_TOKEN }}
ZE_FAIL_BUILD: true
ZE_ENV: production
run: pnpm --filter rstack-website build
Loading