-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hossainemruz <[email protected]>
- Loading branch information
1 parent
5cc8b03
commit 9861a93
Showing
8 changed files
with
150 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: PR Workflows | ||
|
||
# Run action on pull request event | ||
on: [pull_request] | ||
|
||
|
||
jobs: | ||
# Build exampleSite | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout to the commit that has been pushed | ||
- uses: actions/[email protected] | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install node modules | ||
run: npm install | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/[email protected] | ||
with: | ||
hugo-version: 'latest' | ||
extended: true | ||
|
||
- name: Build | ||
run: | | ||
hugo --minify | ||
lighthouse-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Waiting for Netlify Preview | ||
uses: kamranayub/[email protected] | ||
id: preview | ||
with: | ||
site_name: "toha-guides" | ||
max_timeout: 300 | ||
env: | ||
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}} | ||
|
||
- name: Run Lighthouse | ||
uses: foo-software/[email protected] | ||
id: lighthouseCheck | ||
with: | ||
accessToken: ${{ secrets.LIGHTHOUSE_TOKEN }} | ||
gitHubAccessToken: ${{secrets.GITHUB_TOKEN}} | ||
emulatedFormFactor: 'all' | ||
prCommentEnabled: true | ||
prCommentSaveOld: false | ||
timeout: 5 | ||
urls: "${{ steps.preview.outputs.url }},${{ steps.preview.outputs.url }}/posts/,${{ steps.preview.outputs.url }}/posts/markdown-sample/,${{ steps.preview.outputs.url }}/posts/shortcodes/" | ||
|
||
# Check for any broken links | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout to latest commit | ||
- uses: actions/checkout@master | ||
|
||
- name: Waiting for Netlify Preview | ||
uses: kamranayub/[email protected] | ||
id: preview | ||
with: | ||
site_name: "toha-guides" | ||
max_timeout: 300 | ||
env: | ||
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}} | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
args: "--verbose --exclude-mail ${{steps.preview.outputs.url}} --exclude=['https://www.udemy.com/']" | ||
output: lychee/out.md | ||
|
||
- name: Comment Broken Links | ||
if: ${{ steps.lychee.outputs.exit_code != 0 }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
path: lychee/out.md | ||
|
||
- name: Fail workflow if broken links found | ||
if: ${{ steps.lychee.outputs.exit_code != 0 }} | ||
run: exit 1 |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Theme Update" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
update-theme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: main | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/[email protected] | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
|
||
- name: Update hugo modules | ||
run: | | ||
# update to latest version of all modules | ||
hugo mod get -u | ||
# update the npm dependencies | ||
hugo mod npm pack | ||
# cleanup go.sum file | ||
hugo mod tidy | ||
- name: Install node modules | ||
run: npm install | ||
|
||
- name: Build | ||
run: | | ||
# build the site | ||
hugo --minify | ||
# remove file generated by the build | ||
rm -rf public/ | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
base: main | ||
title: Update theme | ||
labels: automerge |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"baseUrl": ".", | ||
"paths": { | ||
"*": [ | ||
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/[email protected]-20230929231747-c943f39617c1/assets/*" | ||
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/[email protected]/assets/*" | ||
] | ||
} | ||
} | ||
|
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
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,10 +1,2 @@ | ||
github.com/hugo-toha/toha/v4 v4.0.0-20230728200917-0e12222cc3bd h1:cSPVhSQLd3CI+QnVl/tpMSKJm50+nYJL/qtAYrUdNkE= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20230728200917-0e12222cc3bd/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20230929231747-c943f39617c1 h1:iPPEerrlIaBH5TvkQSQ71Rg09C5GvGVodM0WOiipUcc= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20230929231747-c943f39617c1/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20231030042714-e61d6b796b48 h1:/3ICPbsN9zTOmIQqSmzVdMCShucO22LgZyPIQhd4yBg= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20231030042714-e61d6b796b48/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20231031071528-05c9d3d850b2 h1:EkR94Ztv1Ao+iEP0e5Vk/GRmZvhAjSHzjsMOXBaK3Ak= | ||
github.com/hugo-toha/toha/v4 v4.0.0-20231031071528-05c9d3d850b2/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= | ||
github.com/hugofy/hugofy v0.0.0-20230215174605-0af4f57bf558 h1:x3Ey1ITCOjhFaCUjubPRAhTTYQw2+g27NuQMqdq8xR8= | ||
github.com/hugofy/hugofy v0.0.0-20230215174605-0af4f57bf558/go.mod h1:5g0QdEPA4ThSe+v5ZGKLfPwrfqiz2mq8mAB8HXI0Trw= | ||
github.com/hugo-toha/toha/v4 v4.0.0 h1:rOiQeXzppzBLslTcQ1q2cqtz4KrjvYsrEVAHClbnsU8= | ||
github.com/hugo-toha/toha/v4 v4.0.0/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= |