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: # blitzkit PUBLIC_BRANCH: main PUBLIC_PROMOTE_OPENTEST: false PUBLIC_STATIC_ASSET_BASE: https://assets.blitzkit.app PUBLIC_GUIDE_WEBSITE: https://guidesblitz.com # blitz WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} # google PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} # wargaming PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} jobs: build: name: Build website runs-on: ubuntu-latest strategy: matrix: chunk: [default, api] steps: - name: Checkout uses: actions/checkout@v6 with: submodules: recursive token: ${{ secrets.GH_TOKEN }} - name: Setup bun uses: oven-sh/setup-bun@v2 - name: Setup protoc uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GH_TOKEN }} - name: Configure pages uses: actions/configure-pages@v6 - name: Install dependencies run: bun install - name: Build run: bun run build env: BUILD_CHUNK: ${{ matrix.chunk }} - name: Upload artifact uses: actions/upload-pages-artifact@v5 with: path: dist/website deploy-github-pages: if: ${{ github.ref == 'refs/heads/production' }} name: Deploy to GitHub Pages runs-on: ubuntu-latest needs: build environment: name: Production url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5