mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-09-07 22:21:10 +00:00
feat: initial theme scaffold
- Repo metadata: theme.toml, README, Apache-2.0 license - Hugo defaults: vi language, post permalinks, taxonomies, paginate, TOC config - exampleSite skeleton with themesDir wiring - CI: Hugo build + Pagefind index + Pages deploy - Pagefind devDependency in package.json (Dependabot weekly) - vi i18n strings, default archetype - Empty layouts/_partials/_markup/_shortcodes directories ready for Phase 3
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
name: Build and deploy exampleSite
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.154.0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Hugo (extended)
|
||||
uses: peaceiris/actions-hugo@v3
|
||||
with:
|
||||
hugo-version: ${{ env.HUGO_VERSION }}
|
||||
extended: true
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build site
|
||||
working-directory: exampleSite
|
||||
run: hugo --gc --minify --baseURL "https://tiennm99.github.io/tsuki/"
|
||||
|
||||
- name: Build Pagefind index
|
||||
run: npx pagefind --site exampleSite/public
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: exampleSite/public
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in New Issue
Block a user