test site_domain change #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Hugo Site to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.16.0' | |
cache: 'npm' | |
- name: Cache Hugo | |
uses: actions/cache@v2 | |
with: | |
path: ~/.hugo_cache | |
key: ${{ runner.os }}-hugo-${{ hashFiles('**/hugo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-hugo- | |
- name: Install Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
- name: Install dependencies | |
run: npm install | |
- name: Build TailwindCSS | |
run: npm run build-tw | |
- name: Build Hugo site | |
env: | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
run: hugo --minify | |
- name: Create CNAME file | |
run: echo 'infuse.quest' > public/CNAME | |
- name: Build Pagefind index | |
run: npx pagefind --site "public" | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |