chore(dist): update validate release scripts for releasing 1.5.0 #761
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
# Sample workflow for building and deploying a Hugo site to GitHub Pages | |
name: "Deploy site to pages (hugo)" | |
on: | |
pull_request: | |
push: | |
branches: ["master"] # Set a branch name to trigger deployment | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
# Hugo steps | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.102.3' | |
extended: true | |
- uses: actions/cache@v3 | |
with: | |
path: /tmp/hugo_cache | |
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-hugomod- | |
- name: Build Site (minify) | |
run: npm i && hugo --minify | |
- name: Deploy Site | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Refer: https://github.com/marketplace/actions/github-pages-action | |
publish_dir: ./public | |
publish_branch: asf-site | |
keep_files: true # A simple way to keep ".asf.yaml" file | |
commit_message: ${{ github.event.head_commit.message }} |