Skip to content

Commit

Permalink
[REFACTOR] bring upstream changes
Browse files Browse the repository at this point in the history
merge 'main' into source2main
  • Loading branch information
jsduenass committed Apr 3, 2024
2 parents 23b0b44 + 5981630 commit 957c227
Show file tree
Hide file tree
Showing 51 changed files with 7,415 additions and 793 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Update dependencies

version: 2
updates:
# Update the Github Action versions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- "automerge"
44 changes: 44 additions & 0 deletions .github/workflows/merge-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Merge to main workflows

# run when a commit is pushed to "source" branch
on:
push:
branches:
- main

jobs:
deploy-to-gh-pages:
runs-on: ubuntu-latest
steps:
# checkout to the commit that has been pushed
- uses: actions/checkout@v4

- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: 'latest'
extended: true

- name: Update Hugo Modules
run: hugo mod tidy

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install node modules
run: |
hugo mod npm pack
npm install
- name: Build
run: hugo --minify

# push the generated content into the `gh-pages` branch.
- name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
91 changes: 91 additions & 0 deletions .github/workflows/pull-request.yml
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"
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: true
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"
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
52 changes: 52 additions & 0 deletions .github/workflows/theme-update.yml
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@v6
with:
base: main
title: Update theme
labels: automerge
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resources/*
public/*
.vscode
.Rproj.user
content/posts/temp/*
resources/*
node_modules/*
public/*
.vscode
.Rproj.user
content/posts/temp/*
24 changes: 24 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
image: registry.gitlab.com/pages/hugo/hugo_extended:latest

default:
before_script:
- apk add --update --no-cache git go nodejs npm
- hugo mod tidy
- hugo mod npm pack
- npm install

test:
script:
- hugo
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH

pages:
script:
- hugo
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

Empty file added .hugo_build.lock
Empty file.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# personal website

## visit the web site 👉 [here](https://jsduenass.github.io/)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b1b93b02-f278-440b-ae1b-304e9f4c4ab5/deploy-status)](https://app.netlify.com/sites/toha/deploys) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fhugo-toha%2Fhugo-toha.github.io%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/hugo-toha/hugo-toha.github.io/goto?ref=main) ![Repository Size](https://img.shields.io/github/repo-size/hugo-toha/hugo-toha.github.io) ![Contributor](https://img.shields.io/github/contributors/hugo-toha/hugo-toha.github.io) ![Last Commit](https://img.shields.io/github/last-commit/hugo-toha/hugo-toha.github.io) ![License](https://img.shields.io/github/license/hugo-toha/hugo-toha.github.io) ![Open Issues](https://img.shields.io/github/issues/hugo-toha/hugo-toha.github.io?color=important) ![Open Pull Requests](https://img.shields.io/github/issues-pr/hugo-toha/hugo-toha.github.io?color=yellowgreen) ![Security Headers](https://img.shields.io/security-headers?url=https%3A%2F%2Fhugo-toha.github.io%2F) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/b7cb60ab/hugo-toha.github.io)

## About
This repository contains a hugo static web site,a personal blog to share content.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sections/education/tech_college.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sections/education/university.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sections/experiences/company1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sections/experiences/company2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sections/experiences/company3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": [
"../../../../../../tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/[email protected]/assets/*"
]
}
}
}
Loading

0 comments on commit 957c227

Please sign in to comment.