-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.97 KB
/
publish.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
# Run publish-cycle on main commits.
#
# Publish cycle comprises:
# - publish site, coverage reports and API documentation to https://nigeleke.github.io
#
name: Publish Cycle
on:
workflow_run:
workflows: ["Acceptance Cycle"]
branches: [main]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Site
run: |
cargo doc --no-deps
cargo install cargo-tarpaulin
cargo tarpaulin --out html --output-dir target/coverage
mkdir docs0
mkdir -p docs0/api
mkdir -p docs0/coverage
cp README.md docs0/
cp -R target/doc/* docs0/api
cp -R target/coverage/tarpaulin-report.html docs0/coverage/index.html
cargo tarpaulin --out xml
rm codecov.*
- name: Publish to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build App
run: |
cargo install dioxus-cli
dx build --release
- name: Publish App & Documentation
run: |
git config --global user.email "[email protected]"
git config --global user.name "Nigel Eke"
export VERSION=$(git describe --abbrev=0 --tags)
git checkout gh-pages
rm -rf docs
mv docs0 docs
mkdir docs/app/
mv target/dx/scopa/release/web/public/* docs/app/
git add .
git commit -m "Release $VERSION"
git push