-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: create reusable action for Node.js and pnpm setup with optimized …
…dependency caching
- Loading branch information
1 parent
4449898
commit bbdbbae
Showing
5 changed files
with
96 additions
and
150 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Setup Node.js and pnpm' | ||
|
||
inputs: | ||
node-version: | ||
type: string | ||
default: '22' | ||
description: 'The version of Node.js to use' | ||
|
||
pnpm-version: | ||
type: string | ||
default: '9' | ||
description: 'The version of pnpm to use' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: ${{ inputs.pnpm-version }} | ||
run_install: false | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: 'pnpm' |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Geist Dapp Kit | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'draft' | ||
- 'main' | ||
push: | ||
branches: | ||
- 'draft' | ||
- 'main' | ||
paths: | ||
- 'apps/storybook/**' | ||
- 'pnpm-*.yaml' | ||
|
||
env: | ||
TEST_EAS_PRIVATE_KEY: ${{ secrets.TEST_EAS_PRIVATE_KEY }} | ||
TEST_USER_PRIVATE_KEY: ${{ secrets.TEST_USER_PRIVATE_KEY }} | ||
LIGHTHOUSE_API_KEY: ${{ secrets.LIGHTHOUSE_API_KEY }} | ||
|
||
jobs: | ||
build-storybook: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js and pnpm | ||
uses: ./.github/actions/setup-node-pnpm | ||
|
||
- name: Build app | ||
run: pnpm --filter storybook build | ||
|
||
- name: Upload storybook build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: storybook-build | ||
path: apps/storybook/storybook-static | ||
|
||
# smoke test, disabled for now | ||
# - name: Build gql | ||
# run: pnpm --filter graphql build:gql | ||
|
||
deploy-storybook: | ||
needs: [build-storybook] | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Node.js and pnpm | ||
uses: ./.github/actions/setup-node-pnpm.yml | ||
|
||
- name: Download storybook build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: storybook-build | ||
path: apps/storybook/storybook-static | ||
|
||
- name: Deploy app | ||
env: | ||
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }} | ||
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }} | ||
run: pnpm --dir apps/storybook deploy:fleek |