-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (77 loc) · 2.52 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Rust
on:
push:
branches: [ "mera", "dev" ]
pull_request:
branches: [ "mera", "dev" ]
# Add permissions configuration
permissions:
contents: write
pages: write
id-token: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
project: ['admin', 'business', 'consumer', 'driver']
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Install tailwind
run: npm install -D tailwindcss
- name: Install tailwind deps (Forms)
run: npm install -D @tailwindcss/forms
- name: Install tailwind deps (Typography)
run: npm install -D @tailwindcss/typography
- name: Install cargo-binstall
uses: cargo-bins/[email protected]
- name: Install Trunk Binary
run: cargo binstall trunk --no-confirm
- name: Install WASM toolchain
run: rustup target add wasm32-unknown-unknown
- name: Build ${{ matrix.project }}
run: |
echo "---------"
cd ${{ matrix.project }}
pwd
echo "--------- tailwindcss"
npx tailwindcss -i ./public/styles/input.css -o ./public/styles/output.css -c ../tailwind.config.cjs
echo "--------- find"
find .
echo "---------ls -l /home/runner/work/fuente/fuente/${{ matrix.project }}/./public/styles/output.css"
ls -l /home/runner/work/fuente/fuente/${{ matrix.project }}/./public/styles/output.css
echo "---------"
trunk build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project }}-dist
path: ${{ matrix.project }}/dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: combined-dist
- name: Prepare combined distribution
run: |
# Move each project's dist contents to its own subdirectory in public
for project in admin business consumer driver; do
mkdir -p public/$project
mv combined-dist/$project-dist/* public/$project/
done
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: true
commit_message: Deploy ${{ github.sha }} to gh-pages