Fix value type State restoration, sync the box not the value (#101?) #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Docs | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
update-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: swift-actions/setup-swift@v1 | |
- name: Install Dependencies | |
run: | | |
sudo apt update && \ | |
sudo apt install -y libgtk-4-dev clang | |
- name: Compile Docs | |
run: | | |
set -eux | |
cd /home/runner/work/swift-cross-ui/swift-cross-ui | |
git config user.email "stackotter@stackotter.dev" | |
git config user.name "stackotter" | |
git fetch | |
git worktree add --checkout gh-pages origin/gh-pages | |
export DOCC_JSON_PRETTYPRINT="YES" | |
export SWIFTPM_ENABLE_COMMAND_PLUGINS=1 | |
swift package \ | |
--allow-writing-to-directory gh-pages/docs \ | |
generate-documentation \ | |
--target SwiftCrossUI \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path swift-cross-ui \ | |
--output-path gh-pages/docs \ | |
--source-service github \ | |
--source-service-base-url https://github.com/stackotter/swift-cross-ui/blob/main \ | |
--checkout-path $(pwd) | |
CURRENT_COMMIT_HASH=`git rev-parse --short HEAD` | |
cd gh-pages | |
git add docs | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Documentation changes found. Commiting the changes to the 'gh-pages' branch and pushing to origin." | |
git commit -m "Update GitHub Pages documentation site to '$CURRENT_COMMIT_HASH'." | |
git push origin HEAD:gh-pages | |
else | |
echo "No documentation changes found." | |
fi |