-
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.
- Loading branch information
Showing
7 changed files
with
122 additions
and
82 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,53 @@ | ||
name: playwright-install | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
# - name: Get playwright version | ||
# shell: bash | ||
# run: | | ||
# echo "PLAYWRIGHT_VERSION=$(node -e "process.stdout.write(require('@playwright/test/package.json').version)")" >> $GITHUB_OUTPUT | ||
# id: playwright-version | ||
|
||
# - name: Cache action | ||
# shell: bash | ||
# uses: actions/cache@v3 | ||
# id: playwright-cache | ||
# with: | ||
# key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }} | ||
# path: ${{ github.workspace }}/ms-playwright | ||
|
||
# https://github.com/microsoft/playwright/issues/7249#issuecomment-1385567519 | ||
- name: Store Playwright's Version | ||
shell: bash | ||
run: | | ||
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//') | ||
echo "Playwright's Version: $PLAYWRIGHT_VERSION" | ||
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | ||
- name: Cache Playwright Browsers for Playwright's Version | ||
shell: bash | ||
id: cache-playwright-browsers | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }} | ||
|
||
- name: Setup Playwright | ||
shell: bash | ||
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | ||
run: pnpm e2e:install | ||
|
||
# - name: ♻️ Restore nextjs-app related caches | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: | | ||
# ${{ github.workspace }}/.next/cache | ||
# ${{ github.workspace }}/.cache | ||
# ${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
# key: ${{ runner.os }}-nextjs-cache-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Build post | ||
shell: bash | ||
run: pnpm e2e:build |
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,33 @@ | ||
name: pnpm-install | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
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,30 @@ | ||
name: code | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 🌱 Install pnpm | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: 🏁 Lint | ||
run: pnpm lint | ||
|
||
build-export: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 🌱 Install pnpm | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: 🏗 Build-export | ||
run: pnpm deploy-blog |
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 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