-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21,402 additions
and
11,664 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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 |
Oops, something went wrong.