Compare commits
2 Commits
e35ae5d88d
...
a1794ee3a7
| Author | SHA1 | Date | |
|---|---|---|---|
| a1794ee3a7 | |||
| a1b5831e10 |
@ -3,7 +3,7 @@ name: Deploy Blog to Folder
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # or your target branch
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -13,12 +13,26 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check commit message for "skipdeploy"
|
||||
id: check_commit
|
||||
run: |
|
||||
COMMIT_MSG=$(git log -1 --pretty=%B)
|
||||
echo "Last commit message: $COMMIT_MSG"
|
||||
if [[ "$COMMIT_MSG" == skipdeploy* ]]; then
|
||||
echo "Skipping deployment due to commit message."
|
||||
echo "should_deploy=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "should_deploy=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build site
|
||||
if: env.should_deploy == 'true'
|
||||
run: |
|
||||
cd ./src
|
||||
npx @11ty/eleventy
|
||||
|
||||
- name: Deploy folder
|
||||
if: env.should_deploy == 'true'
|
||||
run: |
|
||||
echo "Cleaning old site files..."
|
||||
rm -rf /var/sites/cy.cyper.cc/www/html/*
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
# @11ty/eleventy output
|
||||
src/_site/
|
||||
_site/
|
||||
17
package.json
Normal file
17
package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "cybyside",
|
||||
"version": "1.0.0",
|
||||
"description": "My personal blog",
|
||||
"scripts": {
|
||||
"start": "npx @11ty/eleventy --input ./src",
|
||||
"clean": "rm -rf {_site,./src/_site}"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.cyper.cc/Cyper/CyBySide"
|
||||
},
|
||||
"keywords": ["blog", "@11ty/eleventy", "eleventy"],
|
||||
"author": "Cyper",
|
||||
"license": "ISC",
|
||||
"type": "commonjs"
|
||||
}
|
||||
Reference in New Issue
Block a user