Improve performance of fetching number columns by skipping UTF-8 vali… #46
This file contains 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
on: | |
push: | |
branches: [master] | |
jobs: | |
gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: update rust | |
run: | | |
rustup install stable | |
- name: get metadata.docs.rs.features in Cargo.toml | |
run: | | |
docs_features=$(cargo read-manifest | jq -r '.metadata.docs.rs.features | join(",")') | |
echo DOCS_FEATURES=$docs_features | |
echo DOCS_FEATURES=$docs_features >> $GITHUB_ENV | |
- name: cargo doc | |
run: | | |
cargo doc --no-deps --features "${{ env.DOCS_FEATURES }}" | |
- name: push docs | |
run: | | |
git submodule deinit --all | |
git fetch --depth=1 origin gh-pages | |
git checkout gh-pages | |
rm -rf docs | |
mv target/doc docs | |
echo '<html>' > docs/index.html | |
echo '<head><meta http-equiv="refresh" content="5; url=./oracle"/></head>' >> docs/index.html | |
echo '<body><p>Redirect to <a href="./oracle">here</a> in 5 seconds.</p></body>' >> docs/index.html | |
echo '</html>' >> docs/index.html | |
sed -i -E 's/(Version [0-9]+\.[0-9]+\.[0-9]+)/\1<br\/>(in development)/g' docs/oracle/index.html docs/oracle/all.html | |
git config --local user.email "docs-action@github.com" | |
git config --local user.name "GitHub Action (docs)" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git diff --quiet || (git add docs && git commit -m 'Add docs' && git push origin gh-pages && echo Add docs) |