Skip to content

Commit

Permalink
Update worflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-vasilev committed Apr 30, 2024
1 parent a9224c6 commit 4e92b3e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
15 changes: 1 addition & 14 deletions .github/actions/publish_pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,4 @@ runs:
--target ${{ inputs.target }} \
--output-path ./docs/${{ inputs.base_path }} \
--transform-for-static-hosting \
--hosting-base-path flare/${{ inputs.base_path }};
- name: Commit and push generated documentation
uses: actions/checkout@v3
shell: bash
run: |
cp -r ./docs/${{ inputs.base_path }} ./${{ inputs.base_path }}
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git switch gh-pages
git add ./${{ inputs.base_path }}
git commit -a -m "Generated ${{ inputs.target }} Swift DocC"
git push origin gh-pages
--hosting-base-path flare/${{ inputs.base_path }};
29 changes: 24 additions & 5 deletions .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,27 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: ${{ matrix.target }} DocC
uses: ./.github/actions/publish_pages
with:
target: ${{ matrix.target }}
base_path: ${{ matrix.base_path }}
with:
fetch-depth: 0
- name: Build DocC
shell: bash
run: |
mkdir ./docs;
swift build;
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--target ${{ matrix.target }} \
--output-path ./docs/${{ matrix.base_path }} \
--transform-for-static-hosting \
--hosting-base-path flare/${{ matrix.base_path }};
- name: Commit and push generated documentation
run: |
cp -r ./docs/${{ matrix.base_path }} ./${{ matrix.base_path }}
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git switch gh-pages
git add ./${{ matrix.base_path }}
git commit -a -m "Generated ${{ matrix.target }} Swift DocC"
git push origin gh-pages

0 comments on commit 4e92b3e

Please sign in to comment.