mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-05-08 17:25:31 -04:00
Enable website development (#2490)
This commit is contained in:
parent
66225f2eff
commit
af45bcc642
25 changed files with 263 additions and 54 deletions
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
|
@ -49,6 +49,16 @@ updates:
|
|||
interval: "monthly"
|
||||
labels:
|
||||
- "fix:submodules"
|
||||
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
# Disabled because some updates tend to remove needed dependencies for some reason
|
||||
|
||||
# # Maintain dependencies for pipenv
|
||||
|
|
93
.github/workflows/build-container.yml
vendored
Normal file
93
.github/workflows/build-container.yml
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
#
|
||||
name: ☁️ Build Container
|
||||
|
||||
# Configures this workflow to run every time a change is pushed to the branch called `release`.
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: container-build
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
|
||||
jobs:
|
||||
submodule:
|
||||
strategy:
|
||||
matrix:
|
||||
repo: [mkdocs-material-insiders, brand]
|
||||
uses: privacyguides/.github/.github/workflows/download-repo.yml@main
|
||||
with:
|
||||
repo: ${{ matrix.repo }}
|
||||
secrets:
|
||||
ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
|
||||
|
||||
build-and-push-image:
|
||||
needs: submodule
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: repo-*
|
||||
path: modules
|
||||
|
||||
- run: |
|
||||
rm -rf modules/mkdocs-material
|
||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
||||
rm -rf theme/assets/brand
|
||||
mv modules/repo-brand theme/assets/brand
|
||||
|
||||
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3.1.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.5.1
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
flavor: |
|
||||
latest=${{ github.event_name == 'release' }}
|
||||
|
||||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
|
||||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
|
||||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
cleanup:
|
||||
if: ${{ always() }}
|
||||
needs: build-and-push-image
|
||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -3,6 +3,9 @@ name: Build Website
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
base_config:
|
||||
type: string
|
||||
default: mkdocs-production.yml
|
||||
ref:
|
||||
required: true
|
||||
type: string
|
||||
|
@ -90,6 +93,7 @@ jobs:
|
|||
- env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CONTEXT: ${{ inputs.context }}
|
||||
MKDOCS_INHERIT: ${{ inputs.base_config }}
|
||||
PRODUCTION: true
|
||||
run: |
|
||||
pipenv run mkdocs build --config-file config/mkdocs.${{ inputs.lang }}.yml
|
||||
|
|
4
.github/workflows/publish-release.yml
vendored
4
.github/workflows/publish-release.yml
vendored
|
@ -25,6 +25,10 @@ on:
|
|||
tags:
|
||||
- "*"
|
||||
|
||||
concurrency:
|
||||
group: release-deployment
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
|
|
2
.github/workflows/test-lint.yml
vendored
2
.github/workflows/test-lint.yml
vendored
|
@ -63,7 +63,7 @@ jobs:
|
|||
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
|
||||
DISABLE: COPYPASTE,SPELL,HTML
|
||||
DISABLE_LINTERS: JSON_JSONLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER
|
||||
DISABLE_ERRORS_LINTERS: CSS_STYLELINT,MARKDOWN_MARKDOWN_LINK_CHECK,YAML_YAMLLINT
|
||||
DISABLE_ERRORS_LINTERS: CSS_STYLELINT,MARKDOWN_MARKDOWN_LINK_CHECK,YAML_YAMLLINT,DOCKERFILE_HADOLINT,REPOSITORY_TRIVY
|
||||
EDITORCONFIG_EDITORCONFIG_CHECKER_ARGUMENTS: -disable-indentation
|
||||
ENV_DOTENV_LINTER_ARGUMENTS: "--skip QuoteCharacter"
|
||||
MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_INCLUDE: (docs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue