Skip to content

Update _index.md

Update _index.md #66

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
paths:
- 'content/about/**'
- 'content/post/**'
- 'content/log/**'
- 'content/scraps/**'
- 'content/hobby/**'
pull_request:
types: [closed]
workflow_dispatch:
jobs:
deploy:
# if: ${{ github.event_name == 'push' || github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
token: ${{secrets.GITHUB_TOKEN}}
# OGP の作成
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/ogp/requirements.txt
- name: Run main.py
id: latest_data_id
run: |
cd scripts/ogp/
python main.py
- name: Update README.md
run: |
git add -N static/img/images/*.png
if ! git diff --exit-code --quiet static/img/images/*.png
then
git config --global user.name haytok
git config --global user.email haytok@users.noreply.github.com
git pull
git add static/img/images/*.png
git commit -m 'update OGP images'
git push origin main
fi
# ビルドとデプロイ
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public