Skip to content

docs: upgrade theme and add GA for testing #25

docs: upgrade theme and add GA for testing

docs: upgrade theme and add GA for testing #25

Workflow file for this run

name: Documentation Release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ~1.23
- name: Check configuration snippets in documentation
run: go run ./config/checkdoc -r docs/content
shell: bash
- name: Build JSON schema & config reference
run: make generate-jsonschema generate-config-reference
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build for GitHub Pages
run: cd docs && hugo --minify --baseURL https://creativeprojects.github.io/resticprofile/
- name: Prepare for broken link check
run: |
mkdir -p ./www
cp -r ./public ./www/resticprofile
- name: Check broken links
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://creativeprojects.github.io/resticprofile/
pages_path: ./www/
cmd_params: '--exclude="(linux.die.net|stackoverflow.com)" --buffer-size=8192 --max-connections-per-host=5 --rate-limit=5 --timeout=20 --header="User-Agent:curl/7.54.0" --skip-tls-verification'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
# if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-docs
publish_dir: ./public
- name: Build for pages.dev
run: |
cd docs
sed -i "s/canonifyURLs = true/canonifyURLs = false/g" hugo.toml
hugo --minify --baseURL https://resticprofile.creativeprojects.tech/
- name: Publish to pages.dev
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: 'resticprofile'
directory: 'public'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main