This commit is contained in:
@ -10,29 +10,15 @@ jobs:
|
|||||||
runs-on: host
|
runs-on: host
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Skip deployment if commit starts with "nodeploy"
|
|
||||||
id: skip_check
|
|
||||||
run: |
|
|
||||||
COMMIT_MSG="${{ event.head_commit.message }}"
|
|
||||||
echo "Commit message: $COMMIT_MSG"
|
|
||||||
if [[ "$COMMIT_MSG" == nodeploy* ]]; then
|
|
||||||
echo "should_deploy=false" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "should_deploy=true" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
if: env.should_deploy == 'true'
|
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
if: env.should_deploy == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
npm run build
|
npm run build
|
||||||
echo "Site built successfully."
|
echo "Site built successfully."
|
||||||
|
|
||||||
- name: Deploy folder
|
- name: Deploy folder
|
||||||
if: env.should_deploy == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
echo "Cleaning old site files..."
|
echo "Cleaning old site files..."
|
||||||
rm -rf /var/sites/cy.cyper.cc/www/html/*
|
rm -rf /var/sites/cy.cyper.cc/www/html/*
|
||||||
|
|||||||
Reference in New Issue
Block a user