Compare commits

..

4 commits

Author SHA1 Message Date
renovate[bot]
b2d8898ce5
chore(deps): update module github.com/hugomods/hugopress to v0.5.0 2024-06-16 07:45:58 +00:00
ditatombot[bot]
67d7509ff3
Merge pull request #156 from ditatompel/renovate/github.com-hbstack-base-0.x
Merge pull request #156

This merge action was created automatically.

Reviewed-by: ditatompel <ditatompel@users.noreply.github.com>
2024-06-15 10:17:01 +00:00
8822570740
chore: Update workflows (adding staging) 2024-06-15 17:02:26 +07:00
renovate[bot]
fcb36ee5b9
chore(deps): update module github.com/hbstack/base to v0.6.1 2024-06-15 06:08:23 +00:00
4 changed files with 72 additions and 9 deletions

View file

@ -1,7 +1,6 @@
name: Deploy to VPS name: Production
on: on:
# auto deploy when pushing to specified branches.
push: push:
branches: branches:
- main - main
@ -10,14 +9,14 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
publish: deploy:
name: Build and copy to production server
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository_owner == 'ditatompel' if: github.repository_owner == 'ditatompel'
environment: production environment: production
permissions: permissions:
contents: read contents: read
deployments: write deployments: write
name: Build and copy to VPS
steps: steps:
- name: Checkout - name: Checkout
@ -55,10 +54,8 @@ jobs:
- name: Build - name: Build
run: hugo --minify --gc --enableGitInfo --cleanDestinationDir run: hugo --minify --gc --enableGitInfo --cleanDestinationDir
# Use following instead if defaultContentLanguageInSubdir is enabled.
# run: hugo --minify --gc --enableGitInfo --cleanDestinationDir && cp public/en/404.html public/404.html
- name: Deploy website with rsync - name: Deploy
uses: burnett01/rsync-deployments@5.2 uses: burnett01/rsync-deployments@5.2
with: with:
switches: -avzr --quiet --delete switches: -avzr --quiet --delete

64
.github/workflows/staging.yaml vendored Normal file
View file

@ -0,0 +1,64 @@
name: Staging
on:
pull_request:
# allow triggering workflow manually.
workflow_dispatch:
jobs:
deploy:
name: Build and copy to staging VPS
runs-on: ubuntu-latest
if: github.repository_owner == 'ditatompel'
environment: staging
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.126.3"
extended: true
- name: Cache Hugo modules
uses: actions/cache@v4
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Build
run: hugo --minify --gc --enableGitInfo --cleanDestinationDir
- name: Deploy to staging
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --quiet --delete
path: public/
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}

4
go.mod
View file

@ -6,7 +6,7 @@ require (
github.com/GoogleChrome/workbox v7.1.0+incompatible // indirect github.com/GoogleChrome/workbox v7.1.0+incompatible // indirect
github.com/KaTeX/KaTeX v0.16.10 // indirect github.com/KaTeX/KaTeX v0.16.10 // indirect
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 // indirect github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 // indirect
github.com/hbstack/base v0.6.0 // indirect github.com/hbstack/base v0.6.1 // indirect
github.com/hbstack/blog/modules/content-panel v0.1.21 // indirect github.com/hbstack/blog/modules/content-panel v0.1.21 // indirect
github.com/hbstack/blog/modules/toc-scrollspy v0.2.0 // indirect github.com/hbstack/blog/modules/toc-scrollspy v0.2.0 // indirect
github.com/hbstack/carousel v0.2.5 // indirect github.com/hbstack/carousel v0.2.5 // indirect
@ -27,7 +27,7 @@ require (
github.com/hugomods/giscus v0.1.1 // indirect github.com/hugomods/giscus v0.1.1 // indirect
github.com/hugomods/google-adsense v0.1.0 // indirect github.com/hugomods/google-adsense v0.1.0 // indirect
github.com/hugomods/gravatar v0.2.0 // indirect github.com/hugomods/gravatar v0.2.0 // indirect
github.com/hugomods/hugopress v0.4.1 // indirect github.com/hugomods/hugopress v0.5.0 // indirect
github.com/hugomods/icons/vendors/bootstrap v0.5.7 // indirect github.com/hugomods/icons/vendors/bootstrap v0.5.7 // indirect
github.com/hugomods/icons/vendors/font-awesome v0.6.7 // indirect github.com/hugomods/icons/vendors/font-awesome v0.6.7 // indirect
github.com/hugomods/idb-js v0.1.0 // indirect github.com/hugomods/idb-js v0.1.0 // indirect

2
go.sum
View file

@ -7,6 +7,7 @@ github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200/go.mod h1:kx8MBj9T
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI= github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
github.com/hbstack/base v0.6.0 h1:kIMI5C7X1aTWffKnG9N5Db20O6DhjyztN5yAPIFFDbY= github.com/hbstack/base v0.6.0 h1:kIMI5C7X1aTWffKnG9N5Db20O6DhjyztN5yAPIFFDbY=
github.com/hbstack/base v0.6.0/go.mod h1:4A2bxdXMjpj4HSEnugN7hlFECiap4zUX56jOqtu4YPY= github.com/hbstack/base v0.6.0/go.mod h1:4A2bxdXMjpj4HSEnugN7hlFECiap4zUX56jOqtu4YPY=
github.com/hbstack/base v0.6.1/go.mod h1:rDOIrQy8GKXqam3dvHPQnrvwadQByiGcDY1Q35wBrT4=
github.com/hbstack/blog/modules/content-panel v0.1.21 h1:g43IVjn3O6QCQSvCbgr9iYCgZcI5XG8YAiuVPb269Ok= github.com/hbstack/blog/modules/content-panel v0.1.21 h1:g43IVjn3O6QCQSvCbgr9iYCgZcI5XG8YAiuVPb269Ok=
github.com/hbstack/blog/modules/content-panel v0.1.21/go.mod h1:fVnvVtnfo3R78jnGLgckfC43j7rYMMN+l1PhU9E6Jas= github.com/hbstack/blog/modules/content-panel v0.1.21/go.mod h1:fVnvVtnfo3R78jnGLgckfC43j7rYMMN+l1PhU9E6Jas=
github.com/hbstack/blog/modules/toc-scrollspy v0.2.0 h1:UgA7UxoHTOzFDRp1XxhCmCNiSZlfpXqyEBnkPMCMjsM= github.com/hbstack/blog/modules/toc-scrollspy v0.2.0 h1:UgA7UxoHTOzFDRp1XxhCmCNiSZlfpXqyEBnkPMCMjsM=
@ -50,6 +51,7 @@ github.com/hugomods/gravatar v0.2.0/go.mod h1:oATWuh5u2XUK/ZKzOD0VEP5I/TZfVZwplT
github.com/hugomods/hugopress v0.4.0 h1:ZNORTaUTdw3/AJdu3F280r9aM84c+tZyDQpcJOQJ7Ks= github.com/hugomods/hugopress v0.4.0 h1:ZNORTaUTdw3/AJdu3F280r9aM84c+tZyDQpcJOQJ7Ks=
github.com/hugomods/hugopress v0.4.0/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= github.com/hugomods/hugopress v0.4.0/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA=
github.com/hugomods/hugopress v0.4.1/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA= github.com/hugomods/hugopress v0.4.1/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA=
github.com/hugomods/hugopress v0.5.0/go.mod h1:CRYvr60xOkZOf4Atkuj+uEj2EH5pjJ39Ws3aJAkoMkA=
github.com/hugomods/icons/vendors/bootstrap v0.5.6 h1:4Vj7u52gFUnO+Jj/CqmGfsLroify2aysRpIvgHRNjjI= github.com/hugomods/icons/vendors/bootstrap v0.5.6 h1:4Vj7u52gFUnO+Jj/CqmGfsLroify2aysRpIvgHRNjjI=
github.com/hugomods/icons/vendors/bootstrap v0.5.6/go.mod h1:Sw1RhQvFcsQlJ5a4SKpp7A0XHDYQ0DK0pQwnnx+l+Ao= github.com/hugomods/icons/vendors/bootstrap v0.5.6/go.mod h1:Sw1RhQvFcsQlJ5a4SKpp7A0XHDYQ0DK0pQwnnx+l+Ao=
github.com/hugomods/icons/vendors/bootstrap v0.5.7/go.mod h1:bTxiIPJ/idHEc35EtvtwSODLpjI+R54BkGdikO3gCmY= github.com/hugomods/icons/vendors/bootstrap v0.5.7/go.mod h1:bTxiIPJ/idHEc35EtvtwSODLpjI+R54BkGdikO3gCmY=