From ac89c2855217c8d44ab9a585cb36ef1885bf7369 Mon Sep 17 00:00:00 2001 From: FangcatChina Date: Fri, 31 Jul 2026 14:33:20 +0800 Subject: Merge #16, migrate Actions to GIthub --- .gitea/workflows/mkdocs-deploy.yml | 60 ----------------------------- .gitea/workflows/mkdocs-deploy.yml.disabled | 60 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 60 deletions(-) delete mode 100644 .gitea/workflows/mkdocs-deploy.yml create mode 100644 .gitea/workflows/mkdocs-deploy.yml.disabled (limited to '.gitea/workflows') diff --git a/.gitea/workflows/mkdocs-deploy.yml b/.gitea/workflows/mkdocs-deploy.yml deleted file mode 100644 index efdbf7b..0000000 --- a/.gitea/workflows/mkdocs-deploy.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Deploy MkDocs to Another Repository - -on: - push: - branches: - - main - paths: - - 'docs/**' - - 'mkdocs.yml' - - 'overrides/**' - - '.gitea/workflows/mkdocs-deploy.yml' - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout source code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.13' - cache: '' # No Cache - - - name: Install MkDocs dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - - name: Build MkDocs site - run: mkdocs build --strict - env: - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - - - name: Deploy to target repository - env: - TARGET_REPO: https://github.com/LinuxCabin/handbook-site - TARGET_BRANCH: gh-pages - DEPLOY_TOKEN: ${{ secrets.DEPLOY_KEY }} - CUSTOM_DOMAIN: hb.091209.xyz - run: | - cd site - echo "${{ env.CUSTOM_DOMAIN }}" > CNAME # 创建 CNAME 文件 - git init - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Deploy site $(date -u '+%Y-%m-%d %H:%M:%S UTC')" - git push --force https://x-access-token:${DEPLOY_TOKEN}@${TARGET_REPO#https://} HEAD:${TARGET_BRANCH} \ No newline at end of file diff --git a/.gitea/workflows/mkdocs-deploy.yml.disabled b/.gitea/workflows/mkdocs-deploy.yml.disabled new file mode 100644 index 0000000..efdbf7b --- /dev/null +++ b/.gitea/workflows/mkdocs-deploy.yml.disabled @@ -0,0 +1,60 @@ +name: Deploy MkDocs to Another Repository + +on: + push: + branches: + - main + paths: + - 'docs/**' + - 'mkdocs.yml' + - 'overrides/**' + - '.gitea/workflows/mkdocs-deploy.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: '' # No Cache + + - name: Install MkDocs dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build MkDocs site + run: mkdocs build --strict + env: + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} + + - name: Deploy to target repository + env: + TARGET_REPO: https://github.com/LinuxCabin/handbook-site + TARGET_BRANCH: gh-pages + DEPLOY_TOKEN: ${{ secrets.DEPLOY_KEY }} + CUSTOM_DOMAIN: hb.091209.xyz + run: | + cd site + echo "${{ env.CUSTOM_DOMAIN }}" > CNAME # 创建 CNAME 文件 + git init + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Deploy site $(date -u '+%Y-%m-%d %H:%M:%S UTC')" + git push --force https://x-access-token:${DEPLOY_TOKEN}@${TARGET_REPO#https://} HEAD:${TARGET_BRANCH} \ No newline at end of file -- cgit v1.3