[READ-ONLY] Mirror of https://github.com/bombshell-dev/automation. GitHub Actions for the Bombshell organization
ci
0

Configure Feed

Select the types of activity you want to include in your feed.

chore: add preview action

Nate Moore (Dec 29, 2024, 12:34 AM -0600) 79064d80 105c9243

+48
+48
.github/workflows/preview.yml
··· 1 + name: preview 2 + on: 3 + workflow_call: 4 + inputs: 5 + publish: 6 + description: 'The directory to publish to pkg.pr.new' 7 + default: "./packages/**" 8 + required: false 9 + type: string 10 + template: 11 + description: 'The directory of templates to publish to StackBlitz' 12 + default: "./examples/**" 13 + required: false 14 + type: string 15 + 16 + jobs: 17 + preview: 18 + if: github.repository_owner == 'bombshell-dev' 19 + runs-on: ubuntu-latest 20 + 21 + steps: 22 + - name: Generate a token 23 + id: bot-token 24 + uses: actions/create-github-app-token@v1 25 + with: 26 + app-id: ${{ vars.BOT_APP_ID }} 27 + private-key: ${{ secrets.BOT_PRIVATE_KEY }} 28 + 29 + - uses: actions/checkout@v4 30 + with: 31 + ref: ${{ github.head_ref }} 32 + token: ${{ steps.bot-token.outputs.token }} 33 + 34 + - name: Setup PNPM 35 + uses: pnpm/action-setup@v4 36 + 37 + - name: Setup Node 38 + uses: actions/setup-node@v4 39 + with: 40 + node-version: 22 41 + registry-url: https://registry.npmjs.org/ 42 + cache: "pnpm" 43 + 44 + - name: Install dependencies 45 + run: pnpm install 46 + 47 + - name: Format code 48 + run: pnpx pkg-pr-new publish '${{inputs.publish}}' --template '${{inputs.template}}'