mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
task: deploy gh-pages
This commit is contained in:
parent
d339ad464f
commit
d3e97e1ecd
1 changed files with 33 additions and 0 deletions
33
.github/workflows/deploy-gh-pages.yaml
vendored
Normal file
33
.github/workflows/deploy-gh-pages.yaml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Deploy GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # Set a branch to deploy
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Site
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: 'latest'
|
||||
# extended: true
|
||||
|
||||
- name: Build Site
|
||||
run: hugo --minify --source exampleSite
|
||||
|
||||
- name: Deploy Site
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
Loading…
Reference in a new issue