Skip to content

Commit

Permalink
fix: update actions scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
MortyZhaoy committed Sep 5, 2024
1 parent ec8cdd6 commit 984ce27
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
# .github/workflows/gh-pages.yml

name: GitHub Pages

name: deploy github pages
on:
push:
branches:
- main

jobs:
build-deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0

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

- name: Build
hugo-version: 'latest'
- name: Build Hugo
run: hugo --minify

- name: Deploy
- name: Deploy Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
external_repository: MortyZhaoy/MortyZhaoy.github.io
personal_token: ${{ secrets.PAGES_ACTIONS_SECRET }}
publish_dir: ./public
publish_branch: main

0 comments on commit 984ce27

Please sign in to comment.