Skip to content

fix typo

fix typo #47

Workflow file for this run

name: deploy blog workflow
on:
push:
branches:
- main
jobs:
build_job:
name: deploy blog
env:
HUGO_VERSION: "0.139.4"
HUGO_CACHEDIR: /tmp/hugo_cache
ALGOLIA_CLI_VERSION: "1.6.11"
ALGOLIA_INDEX_NAME: "blblog-hugo"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- uses: actions/cache@v4
with:
path: ${{ env.HUGO_CACHEDIR }}
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
- name: upload to algolia index
run: |
curl -L -o algolia.tar.gz https://github.com/algolia/cli/releases/download/v${{ env.ALGOLIA_CLI_VERSION }}/algolia_${{ env.ALGOLIA_CLI_VERSION }}_linux_amd64.tar.gz
tar xvf algolia.tar.gz
jq -c '.[]' ./public/algolia.json | ./algolia_${{ env.ALGOLIA_CLI_VERSION }}_linux_amd64/algolia \
objects import ${{ env.ALGOLIA_INDEX_NAME }} \
--api-key ${{ secrets.ALGOLIA_WRITE_API_KEY }} \
--application-id ${{ secrets.ALGOLIA_APP_ID }} \
-F -
# ビルドの実行結果を Slack に投稿する
- name: Send notification to slack channel
uses: rtCamp/action-slack-notify@v2
if: always()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Job Result: ${{ job.status }}"
SLACK_TITLE: Job Result
SLACK_USERNAME: rtamp