From 6571473da035b002bc1cbe9daa2bb78c92b99410 Mon Sep 17 00:00:00 2001 From: "novr (Nobuhisa Komiya)" Date: Wed, 15 Nov 2023 13:57:24 +0900 Subject: [PATCH] change: bye bitrise --- .github/workflows/publish.yml | 33 ++++++++++++++++++++++++++++----- .gitignore | 4 +++- Package.swift | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d94ce0f..605b116 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,7 @@ on: branches: [ main ] paths: - 'Sources/**' + - 'Package.swift' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -18,13 +19,35 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: macos-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Checkout + uses: actions/checkout@v3 + # Runs a set of commands using the runners shell - - name: Run Bitrise + - name: Build docs run: > - curl -X POST -H "Authorization: ${{secrets.IOSTRAININGBITRISE}}" - --data '{"hook_info":{"type":"bitrise"},"build_params":{"branch":"main","workflow_id":"primary"}}' - https://api.bitrise.io/v0.1/apps/${{secrets.BUILD_SLUG}}/builds + xcodebuild docbuild -scheme YumemiWeather \ + -derivedDataPath .build \ + -destination 'generic/platform=iOS' + $(xcrun --find docc) process-archive \ + transform-for-static-hosting .build/Build/Products/Debug-iphoneos/YumemiWeather.doccarchive \ + --hosting-base-path ios-training \ + --output-path docs + - uses: actions/upload-pages-artifact@v2 + with: + path: docs + deploy: + needs: build + permissions: + pages: write + id-token: write + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/deploy-pages@v2 + id: deployment diff --git a/.gitignore b/.gitignore index 57c7ecb..ae7a0cc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ /Packages /*.xcodeproj xcuserdata/ -DerivedData/ \ No newline at end of file +DerivedData/ +Package.resolved +docs diff --git a/Package.swift b/Package.swift index 9de61cd..5fa8761 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription