Deploy #1417
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Cache multiple crates.io datadump | |
uses: actions/cache@v2 | |
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: "Build and deploy website" | |
if: github.repository_owner == 'bevyengine' | |
uses: shalzz/zola-deploy-action@v0.16.1-1 | |
env: | |
PAGES_BRANCH: gh-pages | |
BUILD_DIR: . | |
TOKEN: ${{ secrets.CART_PAT }} |