forked from bevyengine/bevy-website
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.71 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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') }}