mirror of
https://gitea.com/gitea/blog.git
synced 2024-06-02 01:51:24 +05:30
1a8335063b
Reviewed-on: https://gitea.com/gitea/blog/pulls/257 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
36 lines
936 B
YAML
36 lines
936 B
YAML
name: build and publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
name: build and publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
- name: Setup Hugo
|
|
uses: https://github.com/peaceiris/actions-hugo@v2
|
|
with:
|
|
hugo-version: '0.111.3'
|
|
extended: true
|
|
- name: setup go
|
|
uses: https://github.com/actions/setup-go@v4
|
|
with:
|
|
go-version: '>=1.20.1'
|
|
- name: Build
|
|
run: |
|
|
make clean
|
|
make build
|
|
- name: publish to netlify
|
|
uses: https://github.com/nwtgck/actions-netlify@v2.0
|
|
with:
|
|
publish-dir: public
|
|
production-branch: main
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: b3cd7cc2-68be-4467-b3a6-38f1fdfa0cfc |