mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-07-03 15:41:26 +00:00
update github cd
This commit is contained in:
parent
04aca48a3b
commit
b60b8d8e61
1 changed files with 59 additions and 5 deletions
64
.github/workflows/deploy-blog.yml
vendored
64
.github/workflows/deploy-blog.yml
vendored
|
|
@ -71,8 +71,35 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install chromium --with-deps
|
||||
- name: Install Playwright system dependencies
|
||||
run: npx playwright install-deps chromium
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Install Playwright Chromium headless shell
|
||||
run: |
|
||||
for attempt in 1 2 3; do
|
||||
echo "Installing Playwright Chromium headless shell: attempt ${attempt}/3"
|
||||
|
||||
if timeout 8m npx playwright install chromium --only-shell; then
|
||||
echo "Playwright browser installed successfully."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Playwright browser installation failed or hung."
|
||||
echo "Removing incomplete browser cache before retrying..."
|
||||
rm -rf ~/.cache/ms-playwright
|
||||
|
||||
sleep 10
|
||||
done
|
||||
|
||||
echo "Playwright browser installation failed after 3 attempts."
|
||||
exit 1
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT: "120000"
|
||||
|
||||
- name: List installed Playwright browsers
|
||||
run: npx playwright install --list
|
||||
|
||||
- name: Create .env file
|
||||
run: |
|
||||
|
|
@ -120,7 +147,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout blog-content branch
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: blog-content
|
||||
|
||||
|
|
@ -133,8 +160,35 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install chromium --with-deps
|
||||
- name: Install Playwright system dependencies
|
||||
run: npx playwright install-deps chromium
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Install Playwright Chromium headless shell
|
||||
run: |
|
||||
for attempt in 1 2 3; do
|
||||
echo "Installing Playwright Chromium headless shell: attempt ${attempt}/3"
|
||||
|
||||
if timeout 8m npx playwright install chromium --only-shell; then
|
||||
echo "Playwright browser installed successfully."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Playwright browser installation failed or hung."
|
||||
echo "Removing incomplete browser cache before retrying..."
|
||||
rm -rf ~/.cache/ms-playwright
|
||||
|
||||
sleep 10
|
||||
done
|
||||
|
||||
echo "Playwright browser installation failed after 3 attempts."
|
||||
exit 1
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT: "120000"
|
||||
|
||||
- name: List installed Playwright browsers
|
||||
run: npx playwright install --list
|
||||
|
||||
- name: Create .env file
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue