From 9c39b6a4cac01969d6f8de4789aa1adfc1eab605 Mon Sep 17 00:00:00 2001 From: Mikhail Rubanov Date: Sat, 9 Dec 2023 07:44:43 -0300 Subject: [PATCH] Add workflow --- .github/workflows/update_docs.yml | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/update_docs.yml diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml new file mode 100644 index 0000000..11ea509 --- /dev/null +++ b/.github/workflows/update_docs.yml @@ -0,0 +1,50 @@ +name: Update Documentation + +on: + push: + branches: ["main"] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +env: + LANG: "en_US.UTF-8" + LANGUAGE: "en_US.UTF-8" + LC_ALL: "en_US.UTF-8" + SCHEME: "AccessibilityDocumentation" + XCODE_VERSION: '~>14' + DERIVED_DATA_PATH: './DerivedData/' + DESTINATION: 'platform=iOS Simulator,name=iPhone 11' + HOSTING_BASE_PATH: 'AccessibilityDocumentation' + +jobs: + update-docs: + runs-on: 'macos-latest' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Pages + uses: actions/configure-pages@v2 + + - name: Build + run: | + swift package --allow-writing-to-directory ${{ env.DERIVED_DATA_PATH }} generate-documentation --target ${{ env.SCHEME }} --disable-indexing --transform-for-static-hosting --hosting-base-path '${{ env.HOSTING_BASE_PATH }}' --output-path ${{ env.DERIVED_DATA_PATH }} + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ${{ env.DERIVED_DATA_PATH }} + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 +