Update #10192
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: Update | |
| permissions: {} | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 */3 * * *' # every 3 hours | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: '3.14' | |
| jobs: | |
| update: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup python | |
| id: setup-python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| enable-cache: true | |
| - name: Install Python dependencies | |
| env: | |
| UV_PYTHON: ${{ steps.setup-python.outputs.python-path }} | |
| run: uv sync --locked --no-dev | |
| - name: Restore generated data cache | |
| shell: bash | |
| run: | | |
| mkdir -p gh-pages | |
| git fetch --depth=1 origin gh-pages | |
| for cache_path in github/commitActivity github/commitActivityHashes github/prMetrics; do | |
| if git cat-file -e "origin/gh-pages:${cache_path}"; then | |
| git archive origin/gh-pages "${cache_path}" | tar -x -C gh-pages | |
| fi | |
| done | |
| - name: Collect data | |
| env: | |
| DASHBOARD_AUR_REPOS: sunshine,sunshine-bin,sunshine-git | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_API_TOKEN }} | |
| DISCORD_INVITE: ${{ secrets.DISCORD_INVITE }} | |
| FACEBOOK_GROUP_ID: ${{ secrets.FACEBOOK_GROUP_ID }} | |
| FACEBOOK_PAGE_ID: ${{ secrets.FACEBOOK_PAGE_ID }} | |
| FACEBOOK_TOKEN: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} | |
| GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | |
| GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| PATREON_CAMPAIGN_ID: 6131567 | |
| READTHEDOCS_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }} | |
| THREADING_EXCEPTION_HANDLER: "true" | |
| run: uv run --locked --no-dev python -u -m src.updater | |
| - name: Cat log | |
| if: always() | |
| run: cat ./logs/updater.log | |
| - name: Build dashboard data | |
| run: uv run --locked --no-dev python -u -m src.builder | |
| - name: Prepare Artifacts # uploading artifacts will fail if not zipped due to very large quantity of files | |
| shell: bash | |
| run: 7z a build.zip ./gh-pages/. ./gh-pages-template/. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: update | |
| path: ${{ github.workspace }}/build.zip | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| retention-days: 1 | |
| call-jekyll-build: | |
| needs: update | |
| permissions: | |
| contents: read | |
| uses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@master | |
| secrets: | |
| GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }} | |
| GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | |
| with: | |
| gh_bot_name: ${{ vars.GH_BOT_NAME }} | |
| site_artifact: 'update' | |
| extract_archive: 'build.zip' | |
| target_branch: 'gh-pages' | |
| clean_gh_pages: true | |
| base_url: '_auto' |