-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acea4e1
commit da37199
Showing
3 changed files
with
16 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
name: github pages | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Set a branch that will trigger a deployment | ||
- main # Set a branch name to trigger deployment | ||
pull_request: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: Hugo setup | ||
uses: peaceiris/actions-hugo@v2.6.0 | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: "0.107.0" | ||
extended: true | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: /tmp/hugo_cache | ||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-hugomod- | ||
hugo-version: '0.101.0' | ||
|
||
- name: Build | ||
run: hugo --minify | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' | ||
# If you're changing the branch from main, | ||
# also change the `main` in `refs/heads/main` | ||
# below accordingly. | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
publish_dir: ./public |
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
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