-
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.
optimize + add lighthouse test in CI
- Loading branch information
Showing
4 changed files
with
46 additions
and
3 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 |
---|---|---|
|
@@ -59,4 +59,33 @@ jobs: | |
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
uses: actions/deploy-pages@v4 | ||
|
||
test: | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: $ {{ secrets.LHCI_GITHUB_APP_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
# - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm | ||
# with: | ||
# version: 9 # Not needed if you've set "packageManager" in package.json | ||
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm # or pnpm / yarn | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: npm ci # or pnpm install / yarn install / bun install | ||
- name: Build with VitePress | ||
run: npm run home:build | ||
- name: run Lighthouse CI | ||
run: | | ||
npm install -g @lhci/[email protected] | ||
lhci autorun |
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
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,11 @@ | ||
module.exports = { | ||
ci: { | ||
collect: { | ||
staticDistDir: './home/.vitepress/dist/', | ||
startServerCommand: 'npm run home:preview' | ||
}, | ||
upload: { | ||
target: 'temporary-public-storage', | ||
}, | ||
}, | ||
}; |