Skip to content

Deploy

Deploy #130

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Cache multiple crates.io datadump
uses: actions/cache@v4
with:
path: generate-assets/data
key: ${{ runner.os }}-${{ steps.date.outputs.date }}
- name: "Build Bevy Assets"
run: cd generate-assets && ./generate_assets.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Build Bevy Error Codes"
run: cd generate-errors && ./generate_errors.sh
- name: "Build Bevy Community"
run: cd generate-community && ./generate_community.sh
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown
- name: "Build Bevy Examples"
run: cd generate-wasm-examples && ./generate_wasm_examples.sh
- name: "Sync Donor Info"
run: cd content/donate && ./sync_donors.sh
- name: "Build and deploy website"
if: github.repository_owner == 'bevyengine'
uses: shalzz/[email protected]
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: .
TOKEN: ${{ secrets.CART_PAT }}
# Caches output of generate-assets for use in ci.yml
- name: Update generate-assets cache
uses: actions/cache/save@v4
with:
path: content/assets
key: assets-${{ steps.date.outputs.date }}-${{ hashFiles('generate-assets/**/*.rs', 'generate-assets/Cargo.toml', 'generate-assets/generate_assets.sh') }}