Skip to content

Commit 73a8147

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents f4d17db + 0ad8783 commit 73a8147

File tree

4 files changed

+78
-3
lines changed

4 files changed

+78
-3
lines changed

.github/workflows/build-pr.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Build static docs
3+
4+
on:
5+
pull_request_target:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
environment:
12+
name: build-pr
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
20+
- name: Use Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20.x"
24+
cache: 'npm'
25+
26+
- run: npm ci
27+
- run: npm run build --if-present
28+
29+
- name: Get Project Version from Git Tag
30+
id: get_version
31+
run: |
32+
# Use 'git describe' to find the closest tag, falling back to the commit SHA if no tag is found.
33+
# --tags includes all tags, --always ensures it always outputs something.
34+
VERSION=$(git describe --tags --always)
35+
echo "Project version is $VERSION"
36+
echo "tag=$VERSION" >> $GITHUB_OUTPUT
37+
38+
- name: SonarQube Analysis (Pull Request)
39+
uses: SonarSource/sonarqube-scan-action@v6
40+
env:
41+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
42+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
43+
with:
44+
args: >
45+
-Dsonar.projectVersion=${{ steps.get_version.outputs.tag }}
46+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
47+
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
48+
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

.github/workflows/build.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ name: Build static docs
33

44
on:
55
push:
6-
branches: ["main"]
7-
pull_request:
8-
branches: ["main"]
96

107
jobs:
118
build:
129
runs-on: ubuntu-latest
1310

1411
steps:
1512
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
1615

1716
- name: Use Node.js
1817
uses: actions/setup-node@v4
@@ -22,3 +21,21 @@ jobs:
2221

2322
- run: npm ci
2423
- run: npm run build --if-present
24+
25+
- name: Get Project Version from Git Tag
26+
id: get_version
27+
run: |
28+
# Use 'git describe' to find the closest tag, falling back to the commit SHA if no tag is found.
29+
# --tags includes all tags, --always ensures it always outputs something.
30+
VERSION=$(git describe --tags --always)
31+
echo "Project version is $VERSION"
32+
echo "tag=$VERSION" >> $GITHUB_OUTPUT
33+
34+
- name: SonarQube Analysis (Branch)
35+
uses: SonarSource/sonarqube-scan-action@v6
36+
env:
37+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
39+
with:
40+
args: >
41+
-Dsonar.projectVersion=${{ steps.get_version.outputs.tag }}

pages/introduction.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { Cards, Callout } from "nextra/components";
1010
<Callout>
1111
YouTube Channel: https://youtube.com/@postizofficial
1212
</Callout>
13+
<Callout>
14+
Status Page: https://dtatus.ennogelhaus.de (We're working in getting it on the postiz.com website)
15+
</Callout>
16+
1317

1418
<div className="nx-mt-5 w-full flex justify-center rounded-full">
1519
<img className="hidden nx-dark:block" style={{maxWidth: 150}} src="/logo/dark.png" alt="Hero Dark" />

sonar-project.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sonar.projectKey=gitroomhq_postiz-docs_05fdf459-89fb-4017-abef-3a4bf5181915
2+
sonar.projectName=Postiz Docs
3+
sonar.projectDescription=An Open-Source Social Media Scheduler
4+
5+
# Scan Performace
6+
sonar.exclusions=sitemap-0.xml,sitemap.xml,*.png

0 commit comments

Comments
 (0)