Use pubspec.lock instead of pub.dev api #505
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
name: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '3.29.0' | |
channel: 'stable' | |
- name: Enable Flutter Web | |
run: flutter config --enable-web | |
working-directory: './docs' | |
- name: Install Release Version | |
run: flutter pub add shadcn_flutter | |
working-directory: './docs' | |
continue-on-error: true | |
- name: Download Dependencies Release Version | |
run: flutter pub get | |
working-directory: './docs' | |
- name: Build Release Version | |
run: "flutter build web --wasm --base-href \"/shadcn_flutter/\"" | |
continue-on-error: true | |
working-directory: './docs' | |
- name: Copy to web build directory | |
run: cp -r ./docs/build/web ./docs/public | |
continue-on-error: true | |
working-directory: './' | |
- name: Install Experimental Version | |
run: "flutter pub add 'shadcn_flutter:{\"git\":\"https://github.com/sunarya-thito/shadcn_flutter.git\"}'" | |
continue-on-error: true | |
working-directory: './docs' | |
- name: Download Dependencies Experimental Version | |
run: flutter pub get | |
working-directory: './docs' | |
continue-on-error: true | |
- name: Build Experimental Version | |
run: "flutter build web --wasm --base-href \"/shadcn_flutter/experimental/\"" | |
working-directory: './docs' | |
continue-on-error: true | |
- name: Copy to web build directory | |
run: cp -r ./docs/build/web ./docs/public/experimental | |
working-directory: './' | |
continue-on-error: true | |
- name: Copy release version config file # from ./docs/config/docs-release.json to ./docs/public/assets/docs.json | |
run: cp ./docs/config/docs-release.json ./docs/public/assets/docs.json | |
working-directory: './' | |
continue-on-error: true | |
- name: Copy experimental version config file # from ./docs/config/docs-experimental.json to ./docs/public/experimental/assets/docs.json | |
run: cp ./docs/config/docs-experimental.json ./docs/public/experimental/assets/docs.json | |
working-directory: './' | |
continue-on-error: true | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: './docs/public' | |
force_orphan: true | |
user_name: 'github-ci[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' | |
commit_message: 'Publish to gh-pages' | |
keep_files: true |