mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
67 lines
1.3 KiB
YAML
67 lines
1.3 KiB
YAML
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:
|
|
WOTB_SERVER: ${{ secrets.WOTB_SERVER }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: latest
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
with:
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|
|
|
|
- uses: actions/configure-pages@v5
|
|
|
|
- run: bun run setup
|
|
|
|
- name: Build website
|
|
run: bun run build:website
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: dist/website
|
|
|
|
deploy-github-pages:
|
|
if: ${{ github.ref == 'refs/heads/ue' && github.repository == 'blitzkit/host-beta' }}
|
|
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
|