Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go and all dependencies update #3

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOTION_SECRET=your notion secret
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: build
on:
push:
branches:
- develop
# - master
- main
- master
pull_request:

jobs:
Expand All @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.23.x
- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Run Unit tests.
run: make test
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: .coverprofile
build:
Expand All @@ -29,10 +29,10 @@ jobs:
needs: [test]
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.23.x
- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Build
run: make build
22 changes: 13 additions & 9 deletions .github/workflows/notion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Clean the old post
# Add a random number file to avoid git commit error
run: |
rm -rf ./content/post/*
rm -rf ./content/*
mkdir -p ./content
touch ./content/temp-"$RANDOM".md
- name: notion-site
uses: pkwenda/notion-site@master
uses: lanlin/notion-site@master
env:
NOTION_SECRET : ${{ secrets.NOTION_SECRET }}
- name: Commit files
Expand All @@ -27,15 +30,16 @@ jobs:
git pull origin main
git push
- name: Format documents
uses: creyD/prettier_action@v3.1
uses: creyD/prettier_action@v4.3
with:
commit_message: 'notion-md-gen: update articles (auto)'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
#hugo-version: 'latest'
hugo-version: '0.132.2'
extended: true
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
Expand All @@ -44,8 +48,8 @@ jobs:
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_dir: ./public
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: 1.23.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --rm-dist
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ tmp/
build
bin/
web/
.env
.env.local
.coverprofile
notion-site.yaml
config.yaml
content/
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ builds:
main: ./main.go
ldflags:
- -s -w
- -X github.com/pkwenda/{{ .ProjectName }}/cmd.release={{.Version}}
- -X github.com/pkwenda/{{ .ProjectName }}/cmd.commit={{.Commit}}
- -X github.com/pkwenda/{{ .ProjectName }}/cmd.repo={{.GitURL}}
- -X github.com/lanlin/{{ .ProjectName }}/cmd.release={{.Version}}
- -X github.com/lanlin/{{ .ProjectName }}/cmd.commit={{.Commit}}
- -X github.com/lanlin/{{ .ProjectName }}/cmd.repo={{.GitURL}}
goos:
- linux
- darwin
Expand Down
128 changes: 0 additions & 128 deletions CODEOFCONDUCT.md

This file was deleted.

53 changes: 0 additions & 53 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine
FROM golang:1.23-alpine

RUN apk add --no-cache git

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 pkwenda
Copyright (c) 2024 lanlin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# notion-site


[![](https://img.shields.io/github/v/release/pkwenda/notion-site.svg)](https://github.com/pkwenda/notion-site/releases)
[![](https://img.shields.io/github/license/pkwenda/notion-site.svg)](https://github.com/pkwenda/notion-site/blob/master/LICENSE)
[![](https://img.shields.io/github/v/release/lanlin/notion-site.svg)](https://github.com/lanlin/notion-site/releases)
[![](https://img.shields.io/github/license/lanlin/notion-site.svg)](https://github.com/lanlin/notion-site/blob/master/LICENSE)

**notion-site** is an open source software for a custom website based on [Notion](https://www.notion.so/) and [Hugo](https://gohugo.io/), and you can find your favorite template as your blog or documentation site among the hundreds of templates in the [Hugo Template Store](https://themes.gohugo.io/).

Expand All @@ -25,7 +25,7 @@
### Unix system install

```bash
curl -sSf https://raw.githubusercontent.com/pkwenda/notion-site/master/install.sh | sh
curl -sSf https://raw.githubusercontent.com/lanlin/notion-site/master/install.sh | sh
```


Expand All @@ -42,7 +42,7 @@ notion-site

### Github Action

> The installation command tool is helpful for local debugging. If you do not want to debug locally, you can also copy the configuration file to your project and run it directly through GitHubAction. You can see the example config in [notion-site-doc](https://github.com/pkwenda/notion-site-doc/blob/main/.github/workflows/builder.yml).
> The installation command tool is helpful for local debugging. If you do not want to debug locally, you can also copy the configuration file to your project and run it directly through GitHubAction. You can see the example config in [notion-site-doc](https://github.com/lanlin/notion-site-doc/blob/main/.github/workflows/builder.yml).

To use it as a Github Action, you can use the template of the repository
in [.github/worflows/notion.yml](.github/workflows/notion.yml).
Expand All @@ -61,4 +61,5 @@ See [CONTRIBUTING](CONTRIBUTING.md) for details on submitting patches and the co

## License


notion-site is under the MIT license. See the [LICENSE](/LICENSE) file for details.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: notion-site
author: pkwenda
author: lanlin
description: Build an efficient blog or content Sites based on Notion and Hugo
branding:
icon: inbox
Expand Down
Loading