Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
ci: split docs and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobrg committed Apr 19, 2024
1 parent c3b156f commit 7a0d74e
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 17 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Dokka

on:
pull_request:
branches:
- main

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
docs:
if: startsWith(github.head_ref, 'release/')
environment:
name: Production
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout TIKI Publish Client
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout PR
id: getpr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr checkout ${{ github.event.pull_request.number }}
export PR_BRANCH=$(git branch --show-current)
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
cd Example
pod install --repo-update
- name: Build Docs
id: build_docs
run: |
export TEMP_DIR=$(mktemp -d)
echo "TEMP_DIR=$TEMP_DIR" >> $GITHUB_OUTPUT
cd Example/Pods
xcodebuild docbuild -scheme TikiClient -derivedDataPath $TEMP_DIR -destination generic/platform=iOS
- name: Convert to Static
run: |
$(xcrun --find docc) process-archive transform-for-static-hosting ${{steps.build_docs.outputs.TEMP_DIR}}/Build/Products/Debug-iphoneos/TikiSdk.doccarchive --output-path docs
- name: Commit Docs
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GH Action"
git add docs
git commit -m 'docs: automatic docs generation'
git push
10 changes: 0 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ concurrency:
cancel-in-progress: true

jobs:
docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Publish Jazzy Docs
uses: steven0351/publish-jazzy-docs@v1
with:
personal_access_token: ${{ secrets.ACCESS_TOKEN }}
branch: main

release:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
environment: Production
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- CryptoSwift (1.8.2)
- TikiClient (0.0.2):
- TikiClient (0.0.4):
- CryptoSwift

DEPENDENCIES:
Expand All @@ -16,7 +16,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
CryptoSwift: c63a805d8bb5e5538e88af4e44bb537776af11ea
TikiClient: a267c74ffcf7ebe39e869e602d26caf05aebeeb6
TikiClient: b8d731fc3aa47a8262a49cde6ee77592f3438445

PODFILE CHECKSUM: 40b4e084f57008f1517e1137525ad282b8756281

Expand Down
16 changes: 13 additions & 3 deletions Example/TikiClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
607FACD11AFB9204008FA782 /* Products */,
B5408F1A29BE29310354D039 /* Pods */,
F14D1E576C29C1F52310D1D8 /* Frameworks */,
8CBDD72C2BD26AD400549A74 /* Recovered References */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -130,6 +131,15 @@
path = TikiClientExampleTests;
sourceTree = "<group>";
};
8CBDD72C2BD26AD400549A74 /* Recovered References */ = {
isa = PBXGroup;
children = (
99997F9EA2E68CC22E9BC31D /* Pods_TikiClient_Example.framework */,
FFF57A86C217F3BB10B27DE9 /* Pods_TikiClientExampleTests.framework */,
);
name = "Recovered References";
sourceTree = "<group>";
};
B5408F1A29BE29310354D039 /* Pods */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -207,7 +217,7 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = JC63RM5U2M;
DevelopmentTeam = BKX7BJ2Q77;
LastSwiftMigration = 0900;
};
88E1B7C42B926458005429F1 = {
Expand Down Expand Up @@ -499,7 +509,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)";
DEVELOPMENT_TEAM = JC63RM5U2M;
DEVELOPMENT_TEAM = BKX7BJ2Q77;
INFOPLIST_FILE = TikiClient/Info.plist;
INFOPLIST_KEY_NSCameraUsageDescription = "The app need the camera permision";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "";
Expand All @@ -520,7 +530,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)";
DEVELOPMENT_TEAM = JC63RM5U2M;
DEVELOPMENT_TEAM = BKX7BJ2Q77;
INFOPLIST_FILE = TikiClient/Info.plist;
INFOPLIST_KEY_NSCameraUsageDescription = "The app need the camera permision";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "";
Expand Down
2 changes: 0 additions & 2 deletions Example/TikiClient/Example.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import TikiClient
import CoreLocation
import AppTrackingTransparency


@main
struct Main: App {

Expand All @@ -25,7 +24,6 @@ struct Main: App {

@State var responseTrack = "Asking permission in progress"

//Auth Token
var providerId = ""
var secret = ""
var companyName = ""
Expand Down

0 comments on commit 7a0d74e

Please sign in to comment.