forked from cloudwu/soluna
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 1.7 KB
/
Copy pathpages.yml
File metadata and controls
70 lines (61 loc) · 1.7 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: GitHub Pages
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
name: Build Web Site
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Build Soluna (WASM)
uses: ./.github/actions/soluna
id: build
with:
soluna_path: "."
- name: Install web build tools
run: |
sudo apt-get update
sudo apt-get install -y lua5.4 zip
- name: Prepare web assets
run: |
lua5.4 script/build_web.lua \
--soluna . \
--site web \
--wasm "${{ steps.build.outputs.SOLUNA_WASM_PATH }}" \
--js "${{ steps.build.outputs.SOLUNA_JS_PATH }}"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.119.0"
- name: Build
run: hugo --source web --minify
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: web/public
deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master'
needs: [build]
runs-on: ubuntu-22.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4