docs(readme): rewrite README and add philosophy documentation #765
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: website | |
| on: | |
| # Allow to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| tags: ['*'] | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| JUST_TIMESTAMP: true | |
| JUST_COLOR: always | |
| JUST_EXPLAIN: true | |
| JUST_VERBOSE: 4 | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run | |
| # in-progress and latest queued. However, do NOT cancel in-progress runs as we | |
| # want to allow these production deployments to complete. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| # Confine `run` steps to the `docs` directory. | |
| defaults: | |
| run: | |
| working-directory: ./docs | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.rustup | |
| ~/.cargo/bin/ | |
| ~/.cargo/.crates.toml | |
| ~/.cargo/.crates2.json | |
| key: toolchain-site | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v2 | |
| - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f # v4 | |
| with: | |
| fetch-depth: 0 # Not needed if Vitepress' lastUpdated is not enabled | |
| - uses: Swatinem/rust-cache@7e1e2d0a10862b34e5df481373b2b0f295d1a2ef # v2 | |
| with: | |
| cache-bin: false | |
| cache-workspace-crates: true | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| - uses: actions/configure-pages@d5606572c479bee637007364c6b4800ac4fc8573 # v5 | |
| - run: corepack enable | |
| - run: just build-changelog > change-log.md | |
| - run: just build-docs | |
| - if: ${{ github.ref == 'refs/heads/main' }} | |
| uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | |
| with: | |
| path: | | |
| ~/.rustup | |
| ~/.cargo/bin/ | |
| ~/.cargo/.crates.toml | |
| ~/.cargo/.crates2.json | |
| key: ${{ steps.cache.outputs.cache-primary-key }} | |
| - if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
| uses: actions/upload-pages-artifact@2d163be3ddce01512f3eea7ac5b7023b5d643ce1 # v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: documentation | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |