mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-07-21 16:12:02 +00:00
更新 deploy.sh, .gitlab-ci.yml
This commit is contained in:
parent
3c15c9e3b2
commit
1769ac0a72
@ -16,26 +16,10 @@ before_script:
|
|||||||
- gem install bundler
|
- gem install bundler
|
||||||
- bundle install
|
- bundle install
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- bundle exec jekyll build -d test
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- test
|
|
||||||
except:
|
|
||||||
variables:
|
|
||||||
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- wget -O Mabbs/index.html https://mabbs.github.io/Mabbs/
|
- bash deploy.sh
|
||||||
- rm -rf .git/
|
|
||||||
- bundle exec jekyll build -d public
|
|
||||||
- rm -rf .jekyll-cache/
|
|
||||||
- tar czvf ../MayxBlog.tgz .
|
|
||||||
- mv ../MayxBlog.tgz public/
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
13
deploy.sh
Normal file
13
deploy.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
wget https://github.com/Mabbs/Mabbs/raw/main/README.md
|
||||||
|
mkdir Mabbs
|
||||||
|
echo "---
|
||||||
|
layout: default
|
||||||
|
---" > Mabbs/index.md
|
||||||
|
cat README.md >> Mabbs/index.md
|
||||||
|
rm -rf README.md
|
||||||
|
rm -rf .git/
|
||||||
|
bundle exec jekyll build -d public
|
||||||
|
rm -rf .jekyll-cache/
|
||||||
|
tar czvf ../MayxBlog.tgz .
|
||||||
|
mv ../MayxBlog.tgz public/
|
Loading…
x
Reference in New Issue
Block a user