Skip to content

Commit

Permalink
Create push-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
3000ye authored Feb 25, 2024
1 parent 38099e9 commit d5603bf
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/push-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Simple workflow for deploying static content to GitHub Pages
name: Push Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3

- name: Cache Hugo resources
uses: actions/cache@v3
env:
cache-name: cache-hugo-resources
with:
path: resources
key: ${{ env.cache-name }}

- uses: actions/setup-go@v4
with:
go-version: "^1.17.0"
- run: go version

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true

- name: Build
run: hugo

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: main
folder: public
commit-message: update pages
clean: true
git-config-name: 3000ye
git-config-email: [email protected]
repository-name: 3000ye/codeBlogPage
single-commit: true

0 comments on commit d5603bf

Please sign in to comment.