royalcat refactoring
This commit is contained in:
parent
1da835cea6
commit
b245c9f451
81 changed files with 1476 additions and 1580 deletions
.github/workflows
18
.github/workflows/docker.yaml
vendored
18
.github/workflows/docker.yaml
vendored
|
@ -2,10 +2,10 @@ name: docker
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
main:
|
||||
|
@ -18,7 +18,7 @@ jobs:
|
|||
id: meta
|
||||
uses: crazy-max/ghaction-docker-meta@v5.0.0
|
||||
with:
|
||||
images: distribyted/distribyted
|
||||
images: tstor/tstor
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
|
@ -27,16 +27,16 @@ jobs:
|
|||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.0.0
|
||||
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.0.0
|
||||
uses: docker/login-action@v3.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v5.0.0
|
||||
|
@ -46,10 +46,10 @@ jobs:
|
|||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
|
||||
|
||||
- name: Update repo description
|
||||
uses: peter-evans/dockerhub-description@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
repository: distribyted/distribyted
|
||||
repository: tstor/tstor
|
||||
|
|
73
.github/workflows/mkdocs.yml
vendored
73
.github/workflows/mkdocs.yml
vendored
|
@ -2,75 +2,26 @@ name: mkdocs
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
mkdocs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
# git-revision-date-localized-plugin and mkdocs-rss-plugin need full git history depth
|
||||
fetch-depth: 0
|
||||
python-version: 3.x
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- uses: actions/cache@v3.3.2
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install dependencies
|
||||
working-directory: ./mkdocs
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
python -m pip install -r requirements.txt
|
||||
- name: Build docs
|
||||
working-directory: ./mkdocs
|
||||
run: |
|
||||
mkdocs build
|
||||
# - name: Validate generated HTML files
|
||||
# working-directory: ./mkdocs
|
||||
# run: |
|
||||
# docker run -v $(pwd):/test --rm wjdp/htmltest --conf .htmltest.yml
|
||||
# On push to master or release branch, deploy docs
|
||||
- name: Set up git author
|
||||
run: |
|
||||
remote_repo="https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
git remote rm origin
|
||||
git remote add origin "${remote_repo}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Deploy docs (Master)
|
||||
if: github.ref == 'refs/heads/master'
|
||||
working-directory: ./mkdocs
|
||||
run: |
|
||||
echo "${CUSTOM_DOMAIN}" > "${GITHUB_WORKSPACE}/mkdocs/docs/CNAME"
|
||||
echo -e "User-agent: *\nDisallow: /v*.*/\nSitemap: https://${CUSTOM_DOMAIN}/sitemap.xml" > "${GITHUB_WORKSPACE}/mkdocs/docs/robots.txt"
|
||||
git fetch origin gh-pages --verbose
|
||||
mike deploy master dev --config-file "${GITHUB_WORKSPACE}/mkdocs/mkdocs.yml" --push --rebase
|
||||
env:
|
||||
CUSTOM_DOMAIN: distribyted.com
|
||||
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
|
||||
|
||||
- name: Deploy docs (Versions)
|
||||
env:
|
||||
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
|
||||
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
git fetch origin gh-pages --verbose
|
||||
mike deploy ${GITHUB_REF##*/} latest --config-file "${GITHUB_WORKSPACE}/mkdocs/mkdocs.yml" --push --rebase --update-aliases
|
||||
|
||||
mkdocs-material-
|
||||
- run: pip install mkdocs-material
|
||||
- run: mkdocs gh-deploy --force
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue