refactor: remove unused contents #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Octogray test | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.8' | |
bundler-cache: true | |
- name: Preparation | |
run: | | |
cd ../ | |
git clone https://github.com/imathis/octopress.git ./octopress.orig | |
cp -r octopress.orig octopress.master | |
cd octopress.master | |
git submodule add https://github.com/rcmdnk/octogray.git .themes/octogray | |
sed -i"" 's/[email protected]:/https:\/\/github.com\//' .themes/octogray/.gitmodules | |
cd ../ | |
cp -r octopress.orig octopress.gh-pages | |
cd octopress.gh-pages | |
git submodule add https://github.com/rcmdnk/octogray.git .themes/octogray | |
sed -i"" 's/[email protected]:/https:\/\/github.com\//' .themes/octogray/.gitmodules | |
cd ../ | |
git config --global user.email "[email protected]" | |
git config --global user.name "rcmdnk" | |
git config --global init.defaultBranch main | |
- name: master check | |
run: | | |
cd ../ | |
cd octopress.master | |
./.themes/octogray/setup.sh -y | |
rake setup_github_pages["[email protected]:rcmdnk/test.github.io","yes"] | |
post=$(rake new_post["test"]|grep "Creating new post"|cut -d: -f2) | |
sed -i"" "s/published: *false/published: true/" $post | |
sed -i"" "s/categories:/categories: cat/" $post | |
sed -i"" "s/tags:/tags: tag/" $post | |
sed -i"" "s/<\!-- *more *-->/This is test post."\\$'\n'"<\!-- more -->/" $post | |
sed -i"" "s/{% include after_excerpt.html %}/{% include after_excerpt.html %}"\\$'\n'"# Test Sectiontest"\\$'\n'"test $(date) test./" $post | |
echo >> $post | |
echo "[Code test](/others/codetest/) ">> $post | |
bundle exec jekyll --version | |
#cat _config.yml | |
rake generate --trace | |
- name: gh-pages check | |
run: | | |
cd ../ | |
cd octopress.gh-pages | |
gem update --system --no-document | |
./.themes/octogray/setup.sh -y -l | |
echo rcmdnk.com > source/CNAME | |
rake setup_github_pages["https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}","yes"] | |
grep "^use_token" Rakefile | |
post=$(rake new_post["test"]|grep "Creating new post"|cut -d: -f2) | |
sed -i"" "s/title:.*/title: Test post/" $post | |
sed -i"" "s/categories:.*/categories: cat/" $post | |
sed -i"" "s/tags:.*/tags: [\"tag\"]/" $post | |
sed -i"" "s/published: *false/published: true/" $post | |
sed -i"" "s/<\!-- *more *-->/This is test post."\\$'\n'"<\!-- more -->/" $post | |
sed -i"" "s/^##$/## Test Section"\\$'\n'"test $(date) test./" $post | |
echo >> $post | |
echo "[Code test](/others/codetest/) ">> $post | |
rake gen --trace | |
rake deploy | |