mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
CI: check before deploy
This commit is contained in:
parent
b78e81f89e
commit
95cdc39de2
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -45,6 +45,18 @@ jobs:
|
||||
${{ runner.os }}-v1-
|
||||
- run: bun install
|
||||
- run: bun run build
|
||||
- name: Pre-deploy check
|
||||
# If the public directory doesn't exist, the build should fail.
|
||||
# If the public directory is empty, the build should fail.
|
||||
run: |
|
||||
if [ ! -d public ]; then
|
||||
echo "public directory not found"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! "$(ls -A public)" ]; then
|
||||
echo "public directory is empty"
|
||||
exit 1
|
||||
fi
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user