feat: update dependabot to group updates for minor and patch, but not… #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
stage: | |
description: Stage to deploy to | |
type: environment | |
required: true | |
default: dev | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: 📦 Install dependencies | |
run: pnpm install | |
- name: 🛠️ Build Storybook | |
run: pnpm run build:storybook | |
working-directory: packages/sit-onyx | |
- name: 🛠️ Build documentation | |
run: pnpm run build | |
working-directory: apps/docs | |
- name: Upload Storybook artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: storybook-static | |
path: packages/sit-onyx/storybook-static | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: apps/docs/src/.vitepress/dist | |
deploy_storybook: | |
name: Deploy Storybook | |
runs-on: ubuntu-latest | |
needs: build | |
environment: ${{ inputs.stage || 'dev' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Storybook artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: storybook-static | |
path: packages/sit-onyx/.cloud-foundry/storybook-static | |
- name: Deploy to Cloud Foundry | |
uses: ./.github/templates/cf-push | |
with: | |
endpoint: ${{ vars.CF_ENDPOINT }} | |
org: ${{ vars.CF_ORG }} | |
username: ${{ vars.CF_USERNAME }} | |
password: ${{ secrets.CF_PASSWORD }} | |
# we need to define a fallback value here because the default for the input | |
# is only assigned when the workflow is triggered manually. When triggered e.g. on push | |
# the input will be unset so a fallback is needed here | |
space: ${{ inputs.stage || 'dev' }} | |
working-directory: packages/sit-onyx/.cloud-foundry | |
deploy_documentation: | |
name: Deploy documentation | |
runs-on: ubuntu-latest | |
needs: build | |
environment: ${{ inputs.stage || 'dev' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Storybook artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: documentation | |
path: apps/docs/.cloud-foundry/dist | |
- name: Deploy to Cloud Foundry | |
uses: ./.github/templates/cf-push | |
with: | |
endpoint: ${{ vars.CF_ENDPOINT }} | |
org: ${{ vars.CF_ORG }} | |
username: ${{ vars.CF_USERNAME }} | |
password: ${{ secrets.CF_PASSWORD }} | |
# we need to define a fallback value here because the default for the input | |
# is only assigned when the workflow is triggered manually. When triggered e.g. on push | |
# the input will be unset so a fallback is needed here | |
space: ${{ inputs.stage || 'dev' }} | |
working-directory: apps/docs/.cloud-foundry |