feat: archive ctf #93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: site_build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| sparse-checkout: | | |
| docs | |
| includes | |
| overrides | |
| mkdocs.yml | |
| requirements.txt | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgl1-mesa-dev libx11-dev | |
| - uses: actions/cache@v4 | |
| id: cache-dependencies | |
| with: | |
| path: ./.cache/pip | |
| key: pip-cache-${{ runner.os }}-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| pip-cache-${{ runner.os }}- | |
| - run: pip install --cache-dir ./.cache/pip git+https://github.com/darstib/pyPack.git#subdirectory=mkdocs-toc-plugin | |
| - run: pip install --cache-dir ./.cache/pip mkdocs-material | |
| - run: pip install --cache-dir ./.cache/pip -r requirements.txt | |
| - uses: actions/cache@v4 | |
| id: cache-site | |
| with: | |
| path: ./site | |
| key: site-cache-${{ runner.os }}-${{ hashFiles('docs/**') }} | |
| restore-keys: | | |
| site-cache-${{ runner.os }}- | |
| - run: mkdocs gh-deploy --force --clean | |
| # name: site_build | |
| # on: | |
| # push: | |
| # branches: | |
| # - master | |
| # - main | |
| # permissions: | |
| # contents: write | |
| # jobs: | |
| # deploy: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # sparse-checkout: | | |
| # docs | |
| # includes | |
| # overrides | |
| # - name: Configure Git Credentials | |
| # run: | | |
| # git config user.name github-actions[bot] | |
| # git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| # - uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: 3.x | |
| # - name: Create cache directory | |
| # run: | | |
| # mkdir -p ./.cache/pip # 创建缓存目录 | |
| # - uses: actions/cache@v4 | |
| # id: cache-dependencies | |
| # with: | |
| # key: mkdocs-material-${{ env.cache_id }}-pip-${{ hashFiles('requirements.txt') }} | |
| # path: ./.cache/pip # 明确指定缓存路径 | |
| # restore-keys: | | |
| # mkdocs-material-${{ env.cache_id }}-pip- | |
| # - name: Install system dependencies | |
| # run: | | |
| # sudo apt-get update | |
| # sudo apt-get install -y libgl1-mesa-dev libx11-dev | |
| # - run: pip install --cache-dir ./.cache/pip git+https://github.com/darstib/pyPack.git#subdirectory=mkdocs-toc-plugin | |
| # - run: pip install --cache-dir ./.cache/pip mkdocs-material | |
| # - run: pip install --cache-dir ./.cache/pip -r requirements.txt | |
| # - run: mkdocs gh-deploy --force |