Merge pull request 'Droneでデプロイできるようにする' (#10) from enable-CD-rebased into master

Reviewed-on: #10
This commit is contained in:
Kazuhiro MUSASHI 2023-01-03 04:11:05 +00:00
commit bda2995962
7 changed files with 348 additions and 0 deletions

104
.drone.yml Normal file
View File

@ -0,0 +1,104 @@
kind: pipeline
type: docker
name: production
steps:
- name: submodules
image: alpine/git
commands:
- apk add git-lfs
- git submodule update --init --recursive
- git lfs pull
- name: hugo
image: cibuilds/hugo:0.106
commands:
- sudo hugo -e production --minify -v -s .
- name: Compress-the-Assets
image: alpine:3.9
commands:
- find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c 'cp % %.bk && gzip % && mv %.bk %'
- name: housekeep
image: appleboy/drone-ssh
settings:
host: 10.0.1.166
username: webadm
port: 10022
key:
from_secret: ssh_key
script:
- rm -rf /var/www/everun/*
- rm -rf /home/webadm/works/public/*
- name: scp
image: appleboy/drone-scp
settings:
host: 10.0.1.166
username: webadm
port: 10022
target:
- /var/www/everun
- /home/webadm/works/public
source: public/
key:
from_secret: ssh_key
overwrite: true
strip_components: 1
trigger:
branch:
- master
---
kind: pipeline
type: docker
name: staging
steps:
- name: submodules
image: alpine/git
commands:
- apk add git-lfs
- git submodule update --init --recursive
- git lfs pull
- name: hugo
image: cibuilds/hugo:0.106
commands:
- sudo hugo -e staging --minify -v -s .
- name: Compress-the-Assets
image: alpine:3.9
commands:
- find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c 'cp % %.bk && gzip % && mv %.bk %'
- name: housekeep
image: appleboy/drone-ssh
settings:
host: 10.0.1.166
username: webadm
port: 10022
key:
from_secret: ssh_key
script:
- rm -rf /var/www/test-everun/*
- name: scp
image: appleboy/drone-scp
settings:
host: 10.0.1.166
username: webadm
port: 10022
target: /var/www/test-everun
source: public/
key:
from_secret: ssh_key
overwrite: true
strip_components: 1
trigger:
branch:
exclude:
- master

View File

@ -0,0 +1,35 @@
# -- Site Configuration --
# Refer to the theme docs for more details about each of these parameters.
# https://blowfish.page/docs/getting-started/
theme = "blowfish"
baseURL = "https://staging.everun.club/"
defaultContentLanguage = "ja"
hasCJKLanguage = true
enableRobotsTXT = true
paginate = 20
summaryLength = 80
buildDrafts = false
buildFuture = false
# googleAnalytics = "G-XXXXXXXXX"
[imaging]
anchor = 'Center'
[taxonomies]
author = "authors"
series = "series"
[sitemap]
changefreq = 'daily'
filename = 'sitemap.xml'
priority = 0.5
[outputs]
home = ["HTML", "RSS", "JSON"]
[permalinks]
posts = '/:year/:month/:filename/'

View File

@ -0,0 +1,24 @@
languageCode = "ja"
languageName = "Japanese"
displayName = "日本語"
isoCode = "ja"
weight = 1
rtl = false
title = "EveRun since 1989"
logo = "img/logo.jpg"
description = "東北大学のランニングサークル・イブランのホームページです"
# copyright = "Copy, _right?_ :thinking_face:"
dateFormat = "2006-01-02"
[author]
name = "東北大学ランニングサークル・イブラン"
image = "img/logo.jpg"
headline = "現役メンバーを募集中!我こそはという人はご連絡ください!"
bio = "東北大学の有志によるランニングサークルです。陸上部とは違い、そこまで本気にならずに、好きなペースで、好きな距離を走るサークルです。"
links = [
{ twitter = "https://twitter.com/everun1989" },
{ facebook = "https://www.facebook.com/groups/everun/" },
{ instagram = "https://instagram.com/everun1982" },
]

View File

@ -0,0 +1,13 @@
# -- Markup --
# These settings are required for the theme to function.
[goldmark]
[goldmark.renderer]
unsafe = true
[highlight]
noClasses = false
[tableOfContents]
startLevel = 2
endLevel = 4

View File

@ -0,0 +1,37 @@
# -- Main Menu --
# The main menu is displayed in the header at the top of the page.
# Acceptable parameters are name, pageRef, page, url, title, weight.
#
# The simplest menu configuration is to provide:
# name = The name to be displayed for this menu link
# pageRef = The identifier of the page or section to link to
#
# By default the menu is ordered alphabetically. This can be
# overridden by providing a weight value. The menu will then be
# ordered by weight from lowest to highest.
[[main]]
name = "イブランについて"
pageRef = "about"
weight = 10
[[main]]
name = "スケジュール"
pageRef = "schedule"
weight = 20
[[main]]
name = "活動の記録"
pageRef = "posts"
weight = 30
[[main]]
name = "トピック"
pageRef = "topics"
weight = 40
# -- Footer Menu --
# The footer menu is displayed at the bottom of the page, just before
# the copyright notice. Configure as per the main menu above.

133
config/staging/params.toml Normal file
View File

@ -0,0 +1,133 @@
# -- Theme Options --
# These options control how the theme functions and allow you to
# customise the display of your website.
#
# Refer to the theme docs for more details about each of these parameters.
# https://blowfish.page/docs/configuration/#theme-parameters
colorScheme = "blowfish"
defaultAppearance = "light" # valid options: light or dark
autoSwitchAppearance = true
enableSearch = true
enableCodeCopy = false
mainSections = ["posts"]
# robots = ""
# disableImageOptimization = false
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
[header]
layout = "basic" # valid options: basic, fixed
[footer]
# showMenu = true
showCopyright = true
showThemeAttribution = true
showAppearanceSwitcher = true
showScrollToTop = true
[homepage]
layout = "profile" # valid options: page, profile, hero, card, background, custom
#homepageImage = "IMAGE.jpg" # used in: hero, and card
showRecent = true
showRecentItems = 5
showMoreLink = true
showMoreLinkDest = "/posts"
cardView = false
cardViewScreenWidth = false
layoutBackgroundBlur = false # only used when layout equals background
[article]
showDate = true
#showViews = true
#showLikes = true
showDateUpdated = false
showAuthor = false
showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground
layoutBackgroundHeaderSpace = true # only used when heroStyle equals background
showBreadcrumbs = true
showDraftLabel = true
showEdit = false
# editURL = "https://github.com/username/repo/"
editAppendPath = false
seriesOpened = true
showHeadingAnchors = true
showPagination = true
invertPagination = false
showReadingTime = true
showTableOfContents = true
showTaxonomies = true
showAuthorsBadges = true
showWordCount = true
showSummary = true
sharingLinks = false
[list]
#showHero = true
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
#layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground
#layoutBackgroundHeaderSpace = true # only used when heroStyle equals background
showBreadcrumbs = true
showSummary = true
#showViews = true
#showLikes = true
showTableOfContents = false
showCards = true
groupByYear = true
cardView = true
cardViewScreenWidth = true
[sitemap]
excludedKinds = []
[taxonomy]
showTermCount = true
#showHero = true
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = true
#showViews = false
#showLikes = false
#showTableOfContents = true
cardView = true
[term]
#showHero = true
#heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = true
#showViews = false
#showLikes = false
#showTableOfContents = true
groupByYear = true
cardViewScreenWidth = true
cardView = true
[firebase]
# apiKey = "XXXXXX"
# authDomain = "XXXXXX"
# projectId = "XXXXXX"
# storageBucket = "XXXXXX"
# messagingSenderId = "XXXXXX"
# appId = "XXXXXX"
# measurementId = "XXXXXX"
[fathomAnalytics]
# site = "ABC12345"
# domain = "llama.yoursite.com"
[buymeacoffee]
# identifier = ""
# globalWidget = true
# globalWidgetMessage = "Hello"
# globalWidgetColor = "#FFDD00"
# globalWidgetPosition = "Right"
[verification]
# google = ""
# bing = ""
# pinterest = ""
# yandex = ""

View File

@ -0,0 +1,2 @@
topic = "topics"
author = "authors"