name: Website on: push: workflow_dispatch: # schedule: # - cron: "0 4 * * *" permissions: contents: read pages: write id-token: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref == 'refs/heads/main' }} env: # blitz WOTB_SERVER: ${{ secrets.WOTB_SERVER }} WOTB_VERSION: ${{ secrets.WOTB_VERSION }} PUBLIC_WOTB_CLIENT: ../../temp/game WOTB_USMAP: ../closed/blitz.usmap # google GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} # steam STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} STEAM_APP: 3341250 STEAM_OS: windows STEAM_FINGERPRINT: Manifest_UFSFiles_Win64.txt jobs: build: name: Build chunk ${{ matrix.chunk }} runs-on: ubuntu-latest strategy: matrix: chunk: [pages, api, media] steps: - name: Free disk space uses: jlumbroso/free-disk-space@main - name: Checkout uses: actions/checkout@v6 with: submodules: recursive token: ${{ secrets.GH_TOKEN }} - name: Set up Bun uses: oven-sh/setup-bun@v2 - name: Set up Node uses: actions/setup-node@v6 with: node-version: latest - name: Set up Dotnet uses: actions/setup-dotnet@v5 with: dotnet-version: "10.0.x" - name: Set up Protoc uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GH_TOKEN }} - name: Set up project run: | bun run setup ./scripts/setup_depot_downloader.sh - name: Download fingerprint run: | ./scripts/download_fingerprint.sh # - name: Download cached game # uses: actions/cache@v5 # id: game-cache # with: # path: temp/game # key: ${{ runner.os }}-${{ hashFiles(format('temp/game/{0}', env.FINGERPRINT)) }} - name: Download Steam game # if: steps.game-cache.outputs.cache-hit != 'true' run: scripts/download_game.sh # - name: Build # run: bun run build-website # env: # BUILD_CHUNK: ${{ matrix.chunk }} # - name: Upload artifact # id: upload # uses: actions/upload-pages-artifact@v4 # with: # path: dist/website # - name: Trigger target repository # run: | # curl -X POST \ # -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ # -H "Accept: application/vnd.github.v3+json" \ # https://github.com \ # -d '{ "event_type": "deploy-pages", "client_payload": { "artifact_url": "${{ steps.upload.outputs.artifact_url }}" } }'