You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by ji...@apache.org on 2022/09/14 08:35:56 UTC
[incubator-hugegraph-doc] branch test-build updated: refactor hugo.yml
This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch test-build
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git
The following commit(s) were added to refs/heads/test-build by this push:
new 75319307 refactor hugo.yml
75319307 is described below
commit 75319307795ae4faf30e2314d1fa5b22309b54bd
Author: imbajin <ji...@apache.org>
AuthorDate: Wed Sep 14 16:35:51 2022 +0800
refactor hugo.yml
---
.github/workflows/hugo.yml | 47 ++++++++++++++--------------------------------
1 file changed, 14 insertions(+), 33 deletions(-)
diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml
index 58a04708..a4aa5330 100644
--- a/.github/workflows/hugo.yml
+++ b/.github/workflows/hugo.yml
@@ -15,39 +15,23 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
# Refer: https://github.com/marketplace/actions/github-pages-action
-name: Deploy Hugo site to Pages
+name: Deploy site to pages (hugo)
on:
- # Runs on pushes targeting the default branch
pull_request:
push:
- branches: ["master", "test-build"]
-
- # Allows you to run this workflow manually from the Actions tab
- # workflow_dispatch:
-
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions:
- contents: write # old: read
- pages: write
- id-token: write
-
-# Allow one concurrent deployment
-concurrency:
- group: "pages"
- cancel-in-progress: true
-
-# Default to bash
-defaults:
- run:
- shell: bash
+ branches: ["master", "test-build"] # Set a branch name to trigger deployment
jobs:
- # Build job
- build:
+ deploy:
runs-on: ubuntu-latest
- env:
- HUGO_VERSION: 0.102.3
+ permissions:
+ contents: write
+ pages: write
+ id-token: write
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ # Hugo steps
steps:
- uses: actions/checkout@v3
with:
@@ -62,7 +46,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
- hugo-version: 'latest'
+ hugo-version: '0.102.3'
extended: true
- uses: actions/cache@v2
@@ -72,15 +56,12 @@ jobs:
restore-keys: |
${{ runner.os }}-hugomod-
- - name: Build Site
- env:
- HUGO_ENV: production
+ - name: Build Site (minify)
run: hugo --minify
- - name: Deploy
+ - name: Deploy Site
uses: peaceiris/actions-gh-pages@v3
- # when shall we deploy the website?
- if: github.event_name == 'push' || github.ref == 'refs/heads/master'
+ if: ${{ github.event_name == 'push' || github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# https://gohugo.io/hosting-and-deployment/hosting-on-github/#github-pages-setting