Skip to content

Merge pull request #38 from cooklang/seo/blog-meta-and-internal-links #232

Merge pull request #38 from cooklang/seo/blog-meta-and-internal-links

Merge pull request #38 from cooklang/seo/blog-meta-and-internal-links #232

Workflow file for this run

name: github pages
on:
push:
branches:
- main # Set a branch to deploy
workflow_dispatch:
jobs:
deploy:
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@v2
with:
hugo-version: '0.139.4'
extended: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache Node modules
uses: actions/cache@v3
with:
path: themes/cooklang-tw/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('themes/cooklang-tw/package-lock.json', 'themes/cooklang-tw/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node dependencies
working-directory: themes/cooklang-tw
run: |
npm ci
- name: Build CSS
working-directory: themes/cooklang-tw
run: |
npx tailwindcss -i ./assets/css/main.css -o ./static/css/style.css --minify
- name: Sync documentation
run: |
if [ -f ./scripts/sync-cli-docs.sh ]; then
chmod +x ./scripts/sync-cli-docs.sh
./scripts/sync-cli-docs.sh || echo "Documentation sync failed, continuing..."
fi
if [ -f ./scripts/sync-spec.sh ]; then
chmod +x ./scripts/sync-spec.sh
./scripts/sync-spec.sh || echo "Spec sync failed, continuing..."
fi
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public