-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 1.78 KB
/
Copy pathsite.yml
File metadata and controls
55 lines (54 loc) · 1.78 KB
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
name: Site building and deploying
run-name: Building and deploying site...
on:
release:
types:
- published
jobs:
Building-And-Deploying-Site:
runs-on: ubuntu-latest
name: Site Building And Deploying
env:
github_sha: $GITHUB_SHA
workspace: $GITHUB_WORKSPACE
cache-name: stack-control-site
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
path: main
- name: Cache cargo packages
uses: actions/cache@v4
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}
path: |
~/.cargo
${{env.workspace}}/main/target
- name: Generating documentation
run: |
cd ${{env.workspace}}/main/stack-control-site
cargo run --manifest-path ../stack-control-doc/Cargo.toml -- ./resources/documentation.json
- name: Building wasm
run: |
cd ${{env.workspace}}/main/stack-control-site
cargo install wasm-pack
wasm-pack build ../stack-control-wasm --out-dir ../stack-control-site/resources/stack-control-wasm-module
- name: Building and installing
run: |
cd ${{env.workspace}}/main/stack-control-site
npm install
npm run build
- name: Checkout gen-site
uses: actions/checkout@v4
with:
ref: 'gen-site'
path: site
- name: Publishing site
run: |
cd ${{env.workspace}}/site
cp -R ${{env.workspace}}/main/stack-control-site/dist/. ${{env.workspace}}/site
git config --global user.name 'CREAsTIVE'
git config --global user.email 'CREAsTIVE@users.noreply.github.com'
git add .
git commit -am "gen: site update for ${{env.github_sha}}"
git push