mirror of
https://github.com/unraid/api.git
synced 2026-01-06 08:39:54 -06:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [jiti](https://redirect.github.com/unjs/jiti) | devDependencies | pin | [`^2.4.2` -> `2.4.2`](https://renovatebot.com/diffs/npm/jiti/2.4.2/2.4.2) | | [node](https://redirect.github.com/actions/node-versions) | uses-with | pin | `22` -> `22.17.0` | | [wrangler](https://redirect.github.com/cloudflare/workers-sdk) ([source](https://redirect.github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler)) | devDependencies | pin | [`^4.0.0` -> `4.24.3`](https://renovatebot.com/diffs/npm/wrangler/4.24.3/4.24.3) | | [ws](https://redirect.github.com/websockets/ws) | peerDependencies | pin | [`^8.18.0` -> `8.18.3`](https://renovatebot.com/diffs/npm/ws/8.18.3/8.18.3) | Add the preset `:preserveSemverRanges` to your config if you don't want to pin your dependencies. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/unraid/api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Deploy Storybook to Cloudflare Workers
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'unraid-ui/**'
|
|
pull_request:
|
|
paths:
|
|
- 'unraid-ui/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
name: Deploy Storybook
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.17.0'
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Cache APT Packages
|
|
uses: awalsh128/cache-apt-pkgs-action@v1.5.1
|
|
with:
|
|
packages: bash procps python3 libvirt-dev jq zstd git build-essential libvirt-daemon-system
|
|
version: 1.0
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build Storybook
|
|
run: |
|
|
cd unraid-ui
|
|
pnpm build-storybook
|
|
|
|
- name: Deploy to Cloudflare Workers (Staging)
|
|
id: deploy_staging
|
|
if: github.event_name == 'pull_request'
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }}
|
|
command: deploy --env staging
|
|
workingDirectory: unraid-ui
|
|
|
|
- name: Deploy to Cloudflare Workers (Production)
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_DEPLOY_TOKEN }}
|
|
command: deploy
|
|
workingDirectory: unraid-ui
|
|
|
|
- name: Comment PR with deployment URL
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body: `🚀 Storybook has been deployed to staging: ${{ steps.deploy_staging.outputs['deployment-url'] }}`
|
|
}) |