Added action files and workflows
Signed-off-by: ssp6904 <shoffer@ttnrtsite.me>
This commit is contained in:
parent
1b66b64dc0
commit
274c66071d
13
generators/jekyll.yml
Normal file
13
generators/jekyll.yml
Normal file
@ -0,0 +1,13 @@
|
||||
steps:
|
||||
buildsite:
|
||||
image: ruby
|
||||
commands:
|
||||
- chmod -R a+w .
|
||||
- gem install bundler
|
||||
- bundle install
|
||||
- bundle exec jekyll build
|
||||
pushsite:
|
||||
image: ubuntu
|
||||
commands:
|
||||
- ls -ltr _site
|
||||
- echo "TBA"
|
11
pages/pages.yml
Normal file
11
pages/pages.yml
Normal file
@ -0,0 +1,11 @@
|
||||
steps:
|
||||
pushme:
|
||||
image: ubuntu
|
||||
commands:
|
||||
- chmod -R a+w .
|
||||
- apt update
|
||||
- apt install -y git wget
|
||||
- wget https://git.ttnrtsite.me/TTNRT/actions/pages/run.sh
|
||||
- chmod +x run.sh
|
||||
- bash run.sh <path here>
|
||||
- echo "Done!"
|
38
pages/run.sh
Normal file
38
pages/run.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
check_command() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if ! check_command git; then
|
||||
echo "git not found, please install it!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $(basename "$0") <path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git config --global user.email "hoffershaun842@gmail.com"
|
||||
git config --global user.name "TTGit Automation Bot"
|
||||
git config --global --add --bool push.autoSetupRemote true
|
||||
|
||||
if ! git ls-remote --exit-code --heads origin pages; then
|
||||
git checkout --orphan pages
|
||||
git rm -rf .
|
||||
else
|
||||
git checkout pages
|
||||
fi
|
||||
|
||||
if ! [ -d "$1" ]; then
|
||||
echo "$1 does not exist! Try setting inputs.path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -r "$1"/* . && rm -rf "$1"
|
||||
git add -A
|
||||
git commit -a -m "TTPages: Automated Update"
|
||||
git push -u
|
6
simple/greeting.yml
Normal file
6
simple/greeting.yml
Normal file
@ -0,0 +1,6 @@
|
||||
steps:
|
||||
greeting:
|
||||
image: ubuntu
|
||||
commands:
|
||||
- echo "Hello there! I'm a pipline that runs on TTGit"
|
||||
- echo "Use me for workflows when you need to!"
|
Loading…
Reference in New Issue
Block a user