Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4977398dfc | |||
| 4ed81e0219 | |||
| 7784930f6c | |||
| 38f32ba3f5 | |||
| 86d8cb9cdf | |||
| eafc46da2a | |||
| 9dcdadf0d8 | |||
| 95ef0d3dc3 | |||
| e33c3a8f47 | |||
| 6e135738f8 | |||
| 261f1f492c | |||
| cec6508b55 | |||
| 1412b17408 | |||
| e3576cc243 | |||
| 380121029f | |||
| e406f335ca | |||
| 8ce3e33cb2 | |||
| 94ad97a7cf | |||
| 756b614896 | |||
| c190ec0146 |
@@ -1,16 +1,19 @@
|
|||||||
name: Deploy Hugo Site
|
name: Deploy Hugo Site
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TEA_VERSION: '0.10.1'
|
TEA_VERSION: "0.10.1"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'main'
|
- "main"
|
||||||
paths:
|
paths:
|
||||||
- '**.md'
|
- "**.md"
|
||||||
- '**.toml'
|
- "**.toml"
|
||||||
- '!config/_default/menus*.toml'
|
- "!config/_default/menus*.toml"
|
||||||
- 'assets/**'
|
- "assets/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-and-create-pr:
|
check-and-create-pr:
|
||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
@@ -21,46 +24,31 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Cache tea CLI
|
|
||||||
id: cache-tea
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
|
||||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
|
||||||
- name: Install tea
|
|
||||||
uses: supplypike/setup-bin@v4
|
|
||||||
with:
|
|
||||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
|
||||||
name: tea
|
|
||||||
version: ${{ env.TEA_VERSION }}
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: PR Check'
|
notification_title: "GITEA: PR Check"
|
||||||
notification_message: 'Checking for existing PR... 🔍'
|
notification_message: "Checking for existing PR... 🔍"
|
||||||
- name: Check if open PR exists
|
|
||||||
id: check-opened-pr-step
|
- name: PR Check/Creation
|
||||||
continue-on-error: true
|
uses: https://git.trez.wtf/Trez/gitea-auto-pr@main
|
||||||
run: |
|
with:
|
||||||
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
url: ${{ secrets.TREZ_GITEA_URL }}
|
||||||
pr_exists=$(tea pr list --repo ${{ github.repository }} --state open fields-- index,title,head | egrep '\[HUGO\].*${{ github.ref_name }}' | tail -1 | wc -l)
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
|
pr-label: hugo,manual
|
||||||
- name: Create PR
|
assignee: ${{ github.actor }}
|
||||||
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
|
|
||||||
run: |
|
|
||||||
tea login default gitea-rinoa
|
|
||||||
pr_index_old=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | sed -e 's|"||g' | egrep '^[0-9]' | head -1 | awk -F"," '{print $1}')
|
|
||||||
pr_index_new=$(expr ${pr_index_old} + 1)
|
|
||||||
tea pr c -r ${{ github.repository }} -t "[HUGO] Automated PR for ${{ github.ref_name }} - #${pr_index_new}" -d "Automatically created PR for branch: ${{ github.ref_name }}" -a ${{ github.actor }} -L "Docker Compose"
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: PR Check'
|
notification_title: "GITEA: PR Check"
|
||||||
notification_message: 'PR Created 🎟️'
|
notification_message: "PR Check done 🎟️"
|
||||||
|
|
||||||
hugo-sanity-check:
|
hugo-sanity-check:
|
||||||
name: Hugo Sanity Check
|
name: Hugo Sanity Check
|
||||||
needs: [check-and-create-pr]
|
needs: [check-and-create-pr]
|
||||||
@@ -70,22 +58,26 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Starting link inspectionn... 🔍'
|
notification_message: "Starting link inspectionn... 🔍"
|
||||||
|
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v3.0.0
|
uses: peaceiris/actions-hugo@v3.0.0
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: "latest"
|
||||||
# extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Verify Hugo install
|
- name: Verify Hugo install
|
||||||
run: |
|
run: |
|
||||||
hugo env
|
hugo env
|
||||||
hugo version
|
hugo version
|
||||||
|
|
||||||
- name: Linkinator
|
- name: Linkinator
|
||||||
uses: JustinBeckwith/linkinator-action@v1.11.0
|
uses: JustinBeckwith/linkinator-action@v1.11.0
|
||||||
with:
|
with:
|
||||||
@@ -95,13 +87,15 @@ jobs:
|
|||||||
recurse: true
|
recurse: true
|
||||||
markdown: true
|
markdown: true
|
||||||
verbosity: error
|
verbosity: error
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Broken link inspection done... 🔍'
|
notification_message: "Broken link inspection done... 🔍"
|
||||||
|
|
||||||
pr-merge:
|
pr-merge:
|
||||||
name: PR Merge
|
name: PR Merge
|
||||||
needs: [hugo-sanity-check]
|
needs: [hugo-sanity-check]
|
||||||
@@ -109,34 +103,39 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache tea CLI
|
- name: Cache tea CLI
|
||||||
id: cache-tea
|
id: cache-tea
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||||
with:
|
with:
|
||||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
||||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
||||||
|
|
||||||
- name: Install tea
|
- name: Install tea
|
||||||
uses: supplypike/setup-bin@v4
|
uses: supplypike/setup-bin@8e3f88b4f143d9b5c3497f0fc12d45c83c123787 # v4.0.1
|
||||||
with:
|
with:
|
||||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
||||||
name: tea
|
name: tea
|
||||||
version: ${{ env.TEA_VERSION }}
|
version: ${{ env.TEA_VERSION }}
|
||||||
|
|
||||||
- name: PR Merge
|
- name: PR Merge
|
||||||
id: pr_merge
|
id: pr_merge
|
||||||
run: |
|
run: |
|
||||||
tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
tea login add --name gitea-rinoa --url ${{ secrets.GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
tea login default gitea-rinoa
|
tea login default gitea-rinoa
|
||||||
echo "Merging PR..."
|
echo "Merging PR..."
|
||||||
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
||||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
||||||
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: PR Merge Successful'
|
notification_title: "GITEA: PR Merge Successful"
|
||||||
notification_message: 'PR #${{ steps.pr_merge.outputs.pr_index }} merged.'
|
notification_message: "PR #${{ steps.pr_merge.outputs.pr_index }} merged."
|
||||||
|
|
||||||
deploy-hugo-site:
|
deploy-hugo-site:
|
||||||
name: Build and Deploy to Server
|
name: Build and Deploy to Server
|
||||||
needs: [hugo-sanity-check, pr-merge]
|
needs: [hugo-sanity-check, pr-merge]
|
||||||
@@ -146,23 +145,27 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v3
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "latest"
|
hugo-version: "latest"
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Setup rsync
|
- name: Setup rsync
|
||||||
id: setup_rsync
|
id: setup_rsync
|
||||||
uses: GuillaumeFalourd/setup-rsync@v1.2
|
uses: GuillaumeFalourd/setup-rsync@v1.2
|
||||||
with:
|
with:
|
||||||
ssh_key: ${{ secrets.VPS_DEPLOY_KEY }}
|
ssh_key: ${{ secrets.VPS_DEPLOY_KEY }}
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Starting Hugo deployment... 🤞🏽'
|
notification_message: "Starting Hugo deployment... 🤞🏽"
|
||||||
|
|
||||||
- name: Generate Hugo Site & Deploy for Docker
|
- name: Generate Hugo Site & Deploy for Docker
|
||||||
env:
|
env:
|
||||||
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
||||||
@@ -172,8 +175,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
hugo --minify --source .
|
hugo --minify --source .
|
||||||
rsync -e "ssh -i ${VPS_DEPLOY_KEY} -o StrictHostKeyChecking=no" -avz --progress ./public ${VPS_DEPLOY_USER}@192.168.1.254:${VPS_DEPLOY_DEST}
|
rsync -e "ssh -i ${VPS_DEPLOY_KEY} -o StrictHostKeyChecking=no" -avz --progress ./public ${VPS_DEPLOY_USER}@192.168.1.254:${VPS_DEPLOY_DEST}
|
||||||
|
|
||||||
- name: Restart Hugo Container
|
- name: Restart Hugo Container
|
||||||
uses: appleboy/ssh-action@v1.2.2
|
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5
|
||||||
with:
|
with:
|
||||||
host: 192.168.1.254
|
host: 192.168.1.254
|
||||||
username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
||||||
@@ -181,10 +185,11 @@ jobs:
|
|||||||
key_path: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
key_path: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
||||||
script: |
|
script: |
|
||||||
docker container restart hugo
|
docker container restart hugo
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Hugo deployment successful!'
|
notification_message: "Hugo deployment successful!"
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
name: Deploy Hugo Site
|
name: Deploy Hugo Site
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TEA_VERSION: '0.10.1'
|
TEA_VERSION: "0.10.1"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'main'
|
- "main"
|
||||||
paths:
|
paths:
|
||||||
- 'content/en/*.md'
|
- "content/en/*.md"
|
||||||
- 'config/_default/menus*.toml'
|
- "config/_default/menus*.toml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
hugo-translation-pr:
|
hugo-translation-pr:
|
||||||
name: Hugo Translations & PR Creation
|
name: Hugo Translations & PR Creation
|
||||||
@@ -16,40 +19,46 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo @ Rinoa'
|
notification_title: "GITEA: Hugo @ Rinoa"
|
||||||
notification_message: 'Starting translations...'
|
notification_message: "Starting translations..."
|
||||||
|
|
||||||
- name: Get file listing of English content
|
- name: Get file listing of English content
|
||||||
id: list_files
|
id: list_files
|
||||||
run: |
|
run: |
|
||||||
echo "files=$(find content/en -type f -name "*.md" | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
echo "files=$(find content/en -type f -name "*.md" | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: GPT Translations (es,ko,zh-Hans)
|
- name: GPT Translations (es,ko,zh-Hans)
|
||||||
uses: 3ru/gpt-translate@v1.2.2
|
uses: 3ru/gpt-translate@v1.2.2 # PR creation happens here
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
provider: 'google'
|
provider: "openai"
|
||||||
apikey: ${{ secrets.GOOGLE_TRANSLATE_API_KEY }}
|
apikey: ${{ secrets.OPENAI_API_KEY }}
|
||||||
model: 'models/gemini-2.5-flash-lite'
|
model: "gpt-4o"
|
||||||
inputFiles: ${{ steps.list_files.outputs.files }}
|
inputFiles: ${{ steps.list_files.outputs.files }}
|
||||||
outputFiles: 'content/es/*.md content/ko/*.md content/zh-Hans/*.md'
|
outputFiles: "content/es/*.md content/ko/*.md content/zh-Hans/*.md"
|
||||||
languages: Spanish Korean Chinese
|
languages: Spanish Korean Chinese
|
||||||
|
|
||||||
- name: Add/Commit Translations
|
- name: Add/Commit Translations
|
||||||
id: commit-translations
|
id: commit-translations
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@998652d28d7702d095d40f52ae42982a80ae8c7d # v9.0.1
|
||||||
with:
|
with:
|
||||||
message: "Adding translated content..."
|
message: "Adding translated content..."
|
||||||
add: './content/*'
|
add: "./content/*"
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo @ Rinoa'
|
notification_title: "GITEA: Hugo @ Rinoa"
|
||||||
notification_message: 'Translations completed! Continuing to Hugo sanity check...'
|
notification_message: "Translations completed! Continuing to Hugo sanity check..."
|
||||||
|
|
||||||
hugo-sanity-check:
|
hugo-sanity-check:
|
||||||
name: Hugo Sanity Check
|
name: Hugo Sanity Check
|
||||||
needs: [check-and-create-pr]
|
needs: [check-and-create-pr]
|
||||||
@@ -57,22 +66,26 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Starting link inspectionn... 🔍'
|
notification_message: "Starting link inspectionn... 🔍"
|
||||||
|
|
||||||
- name: Install Hugo
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v3.0.0
|
uses: peaceiris/actions-hugo@v3.0.0
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: "latest"
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Verify Hugo install
|
- name: Verify Hugo install
|
||||||
run: |
|
run: |
|
||||||
hugo env
|
hugo env
|
||||||
hugo version
|
hugo version
|
||||||
|
|
||||||
- name: Linkinator
|
- name: Linkinator
|
||||||
uses: JustinBeckwith/linkinator-action@v1.11.0
|
uses: JustinBeckwith/linkinator-action@v1.11.0
|
||||||
with:
|
with:
|
||||||
@@ -82,13 +95,15 @@ jobs:
|
|||||||
recurse: true
|
recurse: true
|
||||||
markdown: true
|
markdown: true
|
||||||
verbosity: error
|
verbosity: error
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Broken link inspection done... 🔍'
|
notification_message: "Broken link inspection done... 🔍"
|
||||||
|
|
||||||
pr-merge:
|
pr-merge:
|
||||||
name: PR Merge
|
name: PR Merge
|
||||||
needs: [hugo-sanity-check]
|
needs: [hugo-sanity-check]
|
||||||
@@ -96,18 +111,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache tea CLI
|
- name: Cache tea CLI
|
||||||
id: cache-tea
|
id: cache-tea
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||||
with:
|
with:
|
||||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
||||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
||||||
|
|
||||||
- name: Install tea
|
- name: Install tea
|
||||||
uses: supplypike/setup-bin@v4
|
uses: supplypike/setup-bin@8e3f88b4f143d9b5c3497f0fc12d45c83c123787 # v4.0.1
|
||||||
with:
|
with:
|
||||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
||||||
name: tea
|
name: tea
|
||||||
version: ${{ env.TEA_VERSION }}
|
version: ${{ env.TEA_VERSION }}
|
||||||
|
|
||||||
- name: PR Merge
|
- name: PR Merge
|
||||||
id: pr_merge
|
id: pr_merge
|
||||||
run: |
|
run: |
|
||||||
@@ -117,13 +135,15 @@ jobs:
|
|||||||
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
||||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
||||||
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: PR Merge Successful'
|
notification_title: "GITEA: PR Merge Successful"
|
||||||
notification_message: 'PR #${{ steps.pr_merge.outputs.pr_index }} merged.'
|
notification_message: "PR #${{ steps.pr_merge.outputs.pr_index }} merged."
|
||||||
|
|
||||||
deploy-hugo-site:
|
deploy-hugo-site:
|
||||||
name: Build and Deploy to Server
|
name: Build and Deploy to Server
|
||||||
needs: [hugo-sanity-check, pr-merge]
|
needs: [hugo-sanity-check, pr-merge]
|
||||||
@@ -133,23 +153,27 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v3
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: "latest"
|
hugo-version: "latest"
|
||||||
extended: true
|
extended: true
|
||||||
|
|
||||||
- name: Setup rsync
|
- name: Setup rsync
|
||||||
id: setup_rsync
|
id: setup_rsync
|
||||||
uses: GuillaumeFalourd/setup-rsync@v1.2
|
uses: GuillaumeFalourd/setup-rsync@v1.2
|
||||||
with:
|
with:
|
||||||
ssh_key: ${{ secrets.VPS_DEPLOY_KEY }}
|
ssh_key: ${{ secrets.VPS_DEPLOY_KEY }}
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Starting Hugo deployment... 🤞🏽'
|
notification_message: "Starting Hugo deployment... 🤞🏽"
|
||||||
|
|
||||||
- name: Generate Hugo Site & Deploy for Docker
|
- name: Generate Hugo Site & Deploy for Docker
|
||||||
env:
|
env:
|
||||||
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
||||||
@@ -161,8 +185,9 @@ jobs:
|
|||||||
hugo version
|
hugo version
|
||||||
hugo --minify --source .
|
hugo --minify --source .
|
||||||
rsync -e "ssh -i ${VPS_DEPLOY_KEY} -o StrictHostKeyChecking=no" -avz --progress ./public ${VPS_DEPLOY_USER}@192.168.1.254:${VPS_DEPLOY_DEST}
|
rsync -e "ssh -i ${VPS_DEPLOY_KEY} -o StrictHostKeyChecking=no" -avz --progress ./public ${VPS_DEPLOY_USER}@192.168.1.254:${VPS_DEPLOY_DEST}
|
||||||
|
|
||||||
- name: Restart Hugo Container
|
- name: Restart Hugo Container
|
||||||
uses: appleboy/ssh-action@v1.2.2
|
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5
|
||||||
with:
|
with:
|
||||||
host: 192.168.1.254
|
host: 192.168.1.254
|
||||||
username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
||||||
@@ -170,10 +195,11 @@ jobs:
|
|||||||
key_path: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
key_path: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
||||||
script: |
|
script: |
|
||||||
docker container restart hugo
|
docker container restart hugo
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: Hugo'
|
notification_title: "GITEA: Hugo"
|
||||||
notification_message: 'Hugo deployment successful!'
|
notification_message: "Hugo deployment successful!"
|
||||||
|
|||||||
@@ -1,239 +0,0 @@
|
|||||||
name: Deploy Hugo Site
|
|
||||||
env:
|
|
||||||
TEA_VERSION: '0.10.1'
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'main'
|
|
||||||
paths:
|
|
||||||
- '**.md'
|
|
||||||
- '**.toml'
|
|
||||||
- '**.html'
|
|
||||||
- '**.yml'
|
|
||||||
- '**.json'
|
|
||||||
jobs:
|
|
||||||
check-and-create-pr:
|
|
||||||
if: github.ref != 'refs/heads/main'
|
|
||||||
name: Check and Create PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
- name: Cache tea CLI
|
|
||||||
id: cache-tea
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
|
||||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
|
||||||
- name: Install tea
|
|
||||||
uses: supplypike/setup-bin@v4
|
|
||||||
with:
|
|
||||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
|
||||||
name: tea
|
|
||||||
version: ${{ env.TEA_VERSION }}
|
|
||||||
- name: Gotify Notification
|
|
||||||
uses: eikendev/gotify-action@master
|
|
||||||
with:
|
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
notification_title: 'GITEA: PR Check'
|
|
||||||
notification_message: 'Checking for existing PR... 🔍'
|
|
||||||
- name: Check if open PR exists
|
|
||||||
id: check-opened-pr-step
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
|
||||||
pr_exists=$(tea pr list --repo ${{ github.repository }} --state open fields-- index,title,head | egrep '\[HUGO\].*${{ github.ref_name }}' | tail -1 | wc -l)
|
|
||||||
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
|
|
||||||
- name: Create PR
|
|
||||||
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
|
|
||||||
run: |
|
|
||||||
tea login default gitea-rinoa
|
|
||||||
pr_index_old=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | sed -e 's|"||g' | egrep '^[0-9]' | head -1 | awk -F"," '{print $1}')
|
|
||||||
pr_index_new=$(expr ${pr_index_old} + 1)
|
|
||||||
tea pr c -r ${{ github.repository }} -t "[HUGO] Automated PR for ${{ github.ref_name }} - #${pr_index_new}" -d "Automatically created PR for branch: ${{ github.ref_name }}" -a ${{ github.actor }} -L "Docker Compose"
|
|
||||||
- name: Gotify Notification
|
|
||||||
uses: eikendev/gotify-action@master
|
|
||||||
with:
|
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
notification_title: 'GITEA: PR Check'
|
|
||||||
notification_message: 'PR Created 🎟️'
|
|
||||||
hugo-translations:
|
|
||||||
name: Hugo Translations
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [check-and-create-pr]
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
- run: |
|
|
||||||
pwd
|
|
||||||
ls -al
|
|
||||||
- name: Gotify Notification
|
|
||||||
uses: eikendev/gotify-action@master
|
|
||||||
with:
|
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
notification_title: 'GITEA: Hugo @ Rinoa'
|
|
||||||
notification_message: 'Starting translations...'
|
|
||||||
- name: Get file listing of English content
|
|
||||||
id: list_files
|
|
||||||
run: |
|
|
||||||
echo "files=$(find content/en -type f -name "*.md" | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
|
||||||
- name: GPT Translations (es,ko,zh-Hans)
|
|
||||||
uses: 3ru/gpt-translate@v1.2.2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
|
||||||
provider: 'google'
|
|
||||||
apikey: ${{ secrets.GOOGLE_TRANSLATE_API_KEY }}
|
|
||||||
model: 'models/gemini-2.5-flash-lite'
|
|
||||||
inputFiles: ${{ steps.list_files.outputs.files }}
|
|
||||||
outputFiles: 'content/es/*.md content/ko/*.md content/zh-Hans/*.md'
|
|
||||||
languages: Spanish Korean Chinese
|
|
||||||
- name: Add/Commit README.md
|
|
||||||
id: commit-translations
|
|
||||||
uses: EndBug/add-and-commit@v9
|
|
||||||
with:
|
|
||||||
message: "Adding translated content."
|
|
||||||
add: './content/*'
|
|
||||||
- name: Gotify Notification
|
|
||||||
uses: eikendev/gotify-action@master
|
|
||||||
with:
|
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
notification_title: 'GITEA: Hugo @ Rinoa'
|
|
||||||
notification_message: 'Translations completed! Committing and continuing...'
|
|
||||||
# hugo-sanity-check:
|
|
||||||
# name: Hugo Sanity Check
|
|
||||||
# needs: [check-and-create-pr]
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout Code
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
# with:
|
|
||||||
# submodules: true
|
|
||||||
# - name: Gotify Notification
|
|
||||||
# uses: eikendev/gotify-action@master
|
|
||||||
# with:
|
|
||||||
# gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
# gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
# notification_title: 'GITEA: Hugo'
|
|
||||||
# notification_message: 'Starting link inspectionn... 🔍'
|
|
||||||
# - name: Install Hugo
|
|
||||||
# uses: peaceiris/actions-hugo@v3.0.0
|
|
||||||
# with:
|
|
||||||
# hugo-version: 'latest'
|
|
||||||
# # extended: true
|
|
||||||
# - name: Verify Hugo install
|
|
||||||
# run: |
|
|
||||||
# hugo env
|
|
||||||
# hugo version
|
|
||||||
# - name: Linkinator
|
|
||||||
# uses: JustinBeckwith/linkinator-action@v1.11.0
|
|
||||||
# with:
|
|
||||||
# paths: .
|
|
||||||
# serverRoot: ./
|
|
||||||
# format: json
|
|
||||||
# recurse: true
|
|
||||||
# markdown: true
|
|
||||||
# verbosity: error
|
|
||||||
# - name: Gotify Notification
|
|
||||||
# uses: eikendev/gotify-action@master
|
|
||||||
# with:
|
|
||||||
# gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
# gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
# notification_title: 'GITEA: Hugo'
|
|
||||||
# notification_message: 'Broken link inspection done... 🔍'
|
|
||||||
# pr-merge:
|
|
||||||
# name: PR Merge
|
|
||||||
# needs: [hugo-sanity-check]
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
# - name: Cache tea CLI
|
|
||||||
# id: cache-tea
|
|
||||||
# uses: actions/cache@v4
|
|
||||||
# with:
|
|
||||||
# path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
|
||||||
# key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
|
||||||
# - name: Install tea
|
|
||||||
# uses: supplypike/setup-bin@v4
|
|
||||||
# with:
|
|
||||||
# uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
|
||||||
# name: tea
|
|
||||||
# version: ${{ env.TEA_VERSION }}
|
|
||||||
# - name: PR Merge
|
|
||||||
# id: pr_merge
|
|
||||||
# run: |
|
|
||||||
# tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
|
||||||
# tea login default gitea-rinoa
|
|
||||||
# echo "Merging PR..."
|
|
||||||
# pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
|
||||||
# tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
|
||||||
# echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
|
||||||
# - name: Gotify Notification
|
|
||||||
# uses: eikendev/gotify-action@master
|
|
||||||
# with:
|
|
||||||
# gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
# gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
# notification_title: 'GITEA: PR Merge Successful'
|
|
||||||
# notification_message: 'PR #${{ steps.pr_mesubrge.outputs.pr_index }} merged.'
|
|
||||||
# deploy-hugo-site:
|
|
||||||
# name: Build and Deploy to Server
|
|
||||||
# needs: [hugo-sanity-check, pr-merge]
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout Repository
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
# with:
|
|
||||||
# submodules: true
|
|
||||||
# - name: Setup Hugo
|
|
||||||
# uses: peaceiris/actions-hugo@v3
|
|
||||||
# with:
|
|
||||||
# hugo-version: "latest"
|
|
||||||
# extended: true
|
|
||||||
# - name: Setup rsync
|
|
||||||
# id: setup_rsync
|
|
||||||
# uses: GuillaumeFalourd/setup-rsync@v1.2
|
|
||||||
# with:
|
|
||||||
# ssh_key: ${{ secrets.VPS_DEPLOY_KEY }}
|
|
||||||
# - name: Gotify Notification
|
|
||||||
# uses: eikendev/gotify-action@master
|
|
||||||
# with:
|
|
||||||
# gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
# gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
# notification_title: 'GITEA: Hugo'
|
|
||||||
# notification_message: 'Starting Hugo deployment... 🤞🏽'
|
|
||||||
# - name: Generate Hugo Site & Deploy for Docker
|
|
||||||
# env:
|
|
||||||
# VPS_DEPLOY_USER: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
|
||||||
# VPS_DEPLOY_HOST: ${{ secrets.HUGO_SITE_HOST }}
|
|
||||||
# VPS_DEPLOY_DEST: ${{ secrets.VPS_DEPLOY_DEST }}
|
|
||||||
# VPS_DEPLOY_KEY: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
|
||||||
# run: |
|
|
||||||
# echo "${VPS_DEPLOY_KEY}"
|
|
||||||
# hugo version
|
|
||||||
# hugo --minify --source .
|
|
||||||
# rsync -e "ssh -i ${VPS_DEPLOY_KEY} -o StrictHostKeyChecking=no" -avz --progress ./public ${VPS_DEPLOY_USER}@192.168.1.254:${VPS_DEPLOY_DEST}
|
|
||||||
# - name: Restart Hugo Container
|
|
||||||
# uses: appleboy/ssh-action@v1.2.2
|
|
||||||
# with:
|
|
||||||
# host: 192.168.1.254
|
|
||||||
# username: ${{ secrets.HUGO_DEPLOY_USERNAME }}
|
|
||||||
# password: ${{ secrets.HUGO_DEPLOY_PASSWORD }}
|
|
||||||
# key_path: ${{ steps.setup_rsync.outputs.ssh_key_path }}
|
|
||||||
# script: |
|
|
||||||
# docker container restart hugo
|
|
||||||
# - name: Gotify Notification
|
|
||||||
# uses: eikendev/gotify-action@master
|
|
||||||
# with:
|
|
||||||
# gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
|
||||||
# gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
|
||||||
# notification_title: 'GITEA: Hugo'
|
|
||||||
# notification_message: 'Hugo deployment successful!'
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>Trez/renovate-config"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user