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: PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }} WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }} PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }} PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }} jobs: build: name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: recursive token: ${{ secrets.GH_TOKEN }} - uses: oven-sh/setup-bun@v1 - uses: actions/configure-pages@v5 - name: Install dependencies run: bun install - name: Build website run: bun run build:website - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: dist/website deploy-github-pages: if: ${{ github.ref == 'refs/heads/main' }} 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@v4