Skip to content

Commit

Permalink
ci: add ci for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xunpod committed Jun 6, 2024
1 parent cd43aa3 commit 98b01dc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy website to Pages

on:
# Runs on pushes targeting the default branch
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
steps:
- name: Install and Build
run: npm install && npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website

0 comments on commit 98b01dc

Please sign in to comment.