chore(deps): update actions/cache action to v6.1.0 #1593
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: Build & Deploy | |
| on: | |
| push: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| add-contributors: | |
| runs-on: ubuntu-24.04 | |
| if: github.event.repository.fork == false && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: BobAnkh/add-contributors@master | |
| with: | |
| REPO_NAME: 'saltyorg/docs' | |
| CONTRIBUTOR: '### Contributors' | |
| COLUMN_PER_ROW: '6' | |
| ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| IMG_WIDTH: '100' | |
| FONT_SIZE: '14' | |
| PATH: '/README.md' | |
| COMMIT_MESSAGE: 'docs(README): update contributors' | |
| AVATAR_SHAPE: 'square' | |
| build: | |
| runs-on: ubuntu-24.04 | |
| if: github.event.repository.fork == false && github.event_name != 'pull_request' | |
| outputs: | |
| url: ${{ steps.cloudflare.outputs.deployment-url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python 3 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| cache: 'pip' | |
| - name: Restore cache | |
| id: cache-docs-restore | |
| uses: actions/cache/restore@v6 | |
| with: | |
| key: docs- | |
| path: .cache | |
| restore-keys: | | |
| docs- | |
| - name: Install dependencies | |
| run: sudo apt-get install pngquant | |
| - name: Install wheel | |
| run: pip install wheel | |
| - name: Install requirements.txt | |
| run: pip install -r requirements.txt | |
| - name: Build mkdocs | |
| run: | | |
| mkdocs build --clean | |
| mkdocs --version | |
| env: | |
| CI: true | |
| - name: Publish to Cloudflare Pages | |
| if: github.event.repository.fork == false | |
| id: cloudflare | |
| uses: cloudflare/wrangler-action@v4 | |
| with: | |
| apiToken: ${{ secrets.CF_API_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
| command: > | |
| pages deploy site | |
| --project-name=docs | |
| --branch=${{ github.ref_name }} | |
| --commit-hash=${{ github.sha }} | |
| --commit-dirty=true | |
| - name: Save build cache | |
| id: cache-docs-save | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: .cache | |
| key: docs-${{ github.run_id }} |