Compare commits
4 Commits
369b3e6617
...
b4dcd3953d
| Author | SHA1 | Date | |
|---|---|---|---|
| b4dcd3953d | |||
| e17670ea83 | |||
| b6bb70f63b | |||
| ea4a4c805a |
@ -10,26 +10,18 @@ jobs:
|
|||||||
runs-on: host
|
runs-on: host
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Skip deployment if commit starts with "nodeploy"
|
|
||||||
uses: Cyper/GiteaActions/skip-if-commit-prefix@main
|
|
||||||
with:
|
|
||||||
prefix: nodeploy
|
|
||||||
|
|
||||||
- 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: |
|
||||||
cd ./src
|
npm run build
|
||||||
npx @11ty/eleventy
|
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/*
|
||||||
|
|
||||||
echo "Deploying new site files from src/_site folder..."
|
echo "Deploying new site files from src/_site folder..."
|
||||||
mv ./src/_site/* /var/sites/cy.cyper.cc/www/html
|
mv ./_site/* /var/sites/cy.cyper.cc/www/html
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"description": "My personal blog",
|
"description": "My personal blog",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npx @11ty/eleventy --input ./src --serve",
|
"start": "npx @11ty/eleventy --input ./src --serve",
|
||||||
"build": "npx @11ty/eleventy --input .src",
|
"build": "npx @11ty/eleventy --input ./src",
|
||||||
"clean": "rm -rf {_site,./src/_site}"
|
"clean": "rm -rf {_site,./src/_site}"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user