This commit is contained in:
@ -10,29 +10,15 @@ jobs:
|
||||
runs-on: host
|
||||
|
||||
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
|
||||
if: env.should_deploy == 'true'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build site
|
||||
if: env.should_deploy == 'true'
|
||||
run: |
|
||||
npm run build
|
||||
echo "Site built successfully."
|
||||
|
||||
- name: Deploy folder
|
||||
if: env.should_deploy == 'true'
|
||||
run: |
|
||||
echo "Cleaning old site files..."
|
||||
rm -rf /var/sites/cy.cyper.cc/www/html/*
|
||||
|
||||
Reference in New Issue
Block a user