mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-08-24 19:24:14 +02:00
Bumps the github-actions group with 6 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` | | [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) | `1.72.0` | `1.72.1` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.0` | `4.37.2` | | [github/codeql-action/autobuild](https://github.com/github/codeql-action) | `4.37.0` | `4.37.2` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.0` | `4.37.2` | | [actions/setup-python](https://github.com/actions/setup-python) | `6.3.0` | `7.0.0` | Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](9c091bb21b...3d3c42e5aa) Updates `reviewdog/action-actionlint` from 1.72.0 to 1.72.1 - [Release notes](https://github.com/reviewdog/action-actionlint/releases) - [Commits](6fb7acc99f...01d2dd67e3) Updates `github/codeql-action/init` from 4.37.0 to 4.37.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](99df26d4f1...e0647621c2) Updates `github/codeql-action/autobuild` from 4.37.0 to 4.37.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](99df26d4f1...e0647621c2) Updates `github/codeql-action/analyze` from 4.37.0 to 4.37.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](99df26d4f1...e0647621c2) Updates `actions/setup-python` from 6.3.0 to 7.0.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](ece7cb06ca...5fda3b95a4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: reviewdog/action-actionlint dependency-version: 1.72.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/init dependency-version: 4.37.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/autobuild dependency-version: 4.37.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-python dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
101 lines
3.3 KiB
YAML
101 lines
3.3 KiB
YAML
name: Deploy documentation to GitHub Pages
|
|
|
|
# Builds docs with Google Analytics and deploys to https://<site>/doc/
|
|
# Uses rsyslog/rsyslog_dev_doc_base_ubuntu:22.04 Docker container for the Sphinx build.
|
|
# Add GOOGLE_ANALYTICS_ID as a repository secret before use.
|
|
# Set DOC_BASE_URL repository variable (e.g. https://docs.rsyslog.com) for Sitemap base; otherwise uses github.io URL.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: doc-deploy-main
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
if: github.repository == 'rsyslog/rsyslog'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Build documentation in Docker container
|
|
env:
|
|
GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
|
|
DOC_BASE_URL: ${{ vars.DOC_BASE_URL }}
|
|
run: |
|
|
chmod +x doc/tools/inside_docker_doc_html.sh
|
|
docker run --rm \
|
|
-u "$(id -u):$(id -g)" \
|
|
-e GOOGLE_ANALYTICS_ID \
|
|
-e DOC_BASE_URL \
|
|
-e PYTHONUNBUFFERED=1 \
|
|
-v "$(pwd)":/rsyslog \
|
|
--entrypoint /rsyslog/doc/tools/inside_docker_doc_html.sh \
|
|
rsyslog/rsyslog_dev_doc_base_ubuntu:22.04
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: docs-html
|
|
path: doc/build
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'rsyslog/rsyslog'
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Download built docs artifact
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: docs-html
|
|
path: preview-site
|
|
|
|
- name: Prepare Pages artifact with /doc/ subdirectory
|
|
env:
|
|
DOC_BASE_URL: ${{ vars.DOC_BASE_URL }}
|
|
run: |
|
|
set -e
|
|
mkdir -p pages-deployment/doc
|
|
rsync -a --delete preview-site/ pages-deployment/doc/
|
|
cp doc/tools/pages-root-index.html pages-deployment/index.html
|
|
# robots.txt: allow only /doc/, sitemap URL from DOC_BASE_URL or github.repository
|
|
REPO="${{ github.repository }}"
|
|
DEFAULT_BASE="https://${REPO%/*}.github.io/${REPO#*/}"
|
|
BASE="${DOC_BASE_URL:-$DEFAULT_BASE}"
|
|
{
|
|
sed '/^# Sitemap/d' doc/tools/pages-robots.txt
|
|
echo "Sitemap: ${BASE}/doc/sitemap.xml"
|
|
} > pages-deployment/robots.txt
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
|
|
|
- name: Upload to Pages (artifact)
|
|
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
with:
|
|
path: pages-deployment
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
|