Fix github workflow #498
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' | |
- 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/\"" | |
working-directory: './docs' | |
- name: Copy to web build directory | |
run: cp -r ./docs/build/web ./docs/public | |
working-directory: './' | |
- name: Install Experimental Version | |
run: "flutter pub add 'shadcn_flutter:{\"git\":\"https://github.com/sunarya-thito/shadcn_flutter.git\"}'" | |
working-directory: './docs' | |
- name: Download Dependencies Experimental Version | |
run: flutter pub get | |
working-directory: './docs' | |
- name: Build Experimental Version | |
run: "flutter build web --wasm --base-href \"/shadcn_flutter/experimental\"" | |
working-directory: './docs' | |
- name: Copy to web build directory | |
run: cp -r ./docs/build/web ./docs/public/experimental | |
working-directory: './' | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
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' |