Date range in DatePicker #482
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: Deploy PR previews | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pages: write | |
| pull-requests: write | |
| jobs: | |
| deploy-preview: | |
| if: github.event.pull_request.draft == false | |
| name: Deploy PR Preview | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_INCREMENTAL: 1 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: "refs/pull/${{ github.event.pull_request.number }}/merge" | |
| fetch-depth: 0 | |
| - uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev | |
| version: 1.0 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| cache-on-failure: "false" | |
| - uses: cargo-bins/cargo-binstall@main | |
| - name: Install CLI | |
| run: cargo binstall dioxus-cli -y --force --version 0.7.0 | |
| - name: Build | |
| run: cd preview && dx build --web --release --base-path "components/pr-preview/pr-${{ github.event.pull_request.number }}/" | |
| - name: Copy output | |
| run: cp -r target/dx/preview/release/web/public docs | |
| - name: Deploy 🚀 | |
| uses: JamesIves/[email protected] | |
| with: | |
| token: ${{ github.token }} | |
| branch: gh-pages # The branch the action should deploy to. | |
| folder: docs # The folder the action should deploy. | |
| target-folder: "pr-preview/pr-${{ github.event.pull_request.number }}/" | |
| clean: false | |
| single-commit: true | |
| - name: Comment PR | |
| # Only run if the pr just opened | |
| if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review' | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| message: | | |
| Preview available at https://dioxuslabs.github.io/components/pr-preview/pr-${{ github.event.pull_request.number }}/ | |
| comment-tag: "pr-preview" |