Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Jun 7, 2024
1 parent 80cc024 commit 5de4d61
Show file tree
Hide file tree
Showing 3 changed files with 21,402 additions and 11,664 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/run-tests-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
if [[ "$example_value" == "connect-chain" ]] || [[ "$example_id" == "connect-multi-chain" ]] || [[ "$example_value" == "website" ]]; then
echo "template_path=templates" >> $GITHUB_ENV
echo "ci_template_path=ci-templates" >> $GITHUB_ENV
echo "ci_template_path=dest" >> $GITHUB_ENV
else
echo "template_path=examples" >> $GITHUB_ENV
echo "ci_template_path=ci-examples" >> $GITHUB_ENV
echo "ci_template_path=dest" >> $GITHUB_ENV
fi
- name: Log
Expand All @@ -52,7 +52,7 @@ jobs:
echo "Cloning example: ./$template_path/${{ matrix.example }}/" into "${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
cp -r ./$template_path/${{ matrix.example }}/ ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
cp -r ./$template_path/${{ matrix.example }}/ ${{ github.workspace }}/$ci_template_path/
cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
- name: Set up Node.js
Expand All @@ -63,10 +63,21 @@ jobs:
- name: Set up Yarn
uses: threeal/[email protected]

- name: Cache NextJS
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/$ci_template_path/${{ matrix.example }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Build example project
run: |
echo "Building example: ${{ matrix.example }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}/${{ matrix.example }}"
cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}/${{ matrix.example }}
echo "Building example: ${{ matrix.example }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
ls -la
yarn install
yarn build
Loading

0 comments on commit 5de4d61

Please sign in to comment.