Pump up flutter version #227
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Deploy website with all dependencies | |
env: | |
LOCAL_ASSETS_FOLDER: "assets" | |
on: | |
push: | |
branches: ["main", "dev"] | |
jobs: | |
build: | |
name: 🚀 Deploy website on push | |
#runs-on: windows-latest | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/[email protected] | |
- name: Set up Python 3.11 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.11" | |
# You can test your matrix by printing the current Python version | |
- name: Setup python env | |
run: | | |
pip install git+https://github.com/Kataglyphis/Kataglyphis-WebDavClient | |
- name: Download blog content | |
run: | | |
echo $(pwd) | |
ls | |
python -c "import sys; print(sys.version)" | |
# echo "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# echo "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
python scripts/download_markdown_files.py ${{ secrets.WEBDAV_HOSTNAME }} ${{ secrets.WEBDAV_USERNAME }} ${{ secrets.WEBDAV_PASSWORD }} ${{ secrets.REMOTE_BASE_PATH }} "$LOCAL_ASSETS_FOLDER" | |
# echo "After executing .md deploy script the asset folder has following content:" | |
# ls "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# echo "Verifying downloaded files in assets folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# echo "Verifying downloaded files in assets/documents/books/ folder:" | |
# ls -R "$LOCAL_ASSETS_FOLDER/documents/books" | |
# echo "Verifying downloaded files in $(pwd)/assets/documents/books/ folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER/documents/books" | |
# echo "After executing .md deploy script the asset folder has following content:" | |
# ls "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# echo "Verifying downloaded files in assets folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# echo "Verifying downloaded files in assets/documents/books/ folder:" | |
# ls -R "$LOCAL_ASSETS_FOLDER/documents/books" | |
# echo "Verifying downloaded files in $(pwd)/assets/documents/books/ folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER/documents/books" | |
# - name: Verify downloaded files | |
# run: | | |
# echo "Verifying downloaded files in assets folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
# - name: Verify downloaded files | |
# run: | | |
# echo "Verifying downloaded files in assets folder:" | |
# ls -R "$(pwd)/$LOCAL_ASSETS_FOLDER" | |
- name: Setup Flutter SDK | |
uses: flutter-actions/[email protected] | |
with: | |
channel: stable | |
version: 3.27.1 | |
# Note: This workflow uses the latest stable version of the Dart SDK. | |
# You can specify other versions if desired, see documentation here: | |
# https://github.com/dart-lang/setup-dart/blob/main/README.md | |
# - uses: dart-lang/setup-dart@v1 | |
# - uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
run: | | |
git submodule update --init --recursive | |
flutter pub get | |
cd external/jotrockenmitlockenrepo | |
flutter pub get | |
# Uncomment this step to verify the use of 'dart format' on each commit. | |
- name: Verify formatting | |
continue-on-error: true | |
run: dart format --output=none --set-exit-if-changed . | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
- name: Analyze project source | |
continue-on-error: true | |
run: dart analyze | |
# Your project will need to have tests in test/ and a dependency on | |
# package:test for this step to succeed. Note that Flutter projects will | |
# want to change this to 'flutter test'. | |
- name: Run tests | |
run: | | |
flutter test | |
- name: Enable flutter web | |
run: | | |
flutter config --enable-web | |
# for production I do not use wasm yet! | |
- name: "Build Web App" | |
if: github.ref == 'refs/heads/main' | |
run: | | |
flutter build web --release --web-renderer canvaskit | |
- name: "Build Web App (WASM)" | |
if: github.ref == 'refs/heads/dev' | |
id: build-wasm | |
continue-on-error: true | |
run: | | |
flutter build web --release --wasm | |
- name: 📂 Sync files to main domain | |
if: github.ref == 'refs/heads/main' | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.SERVER }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PW }} | |
local-dir: "./build/web/" | |
- name: 📂 Sync files to dev wasm domain | |
if: github.ref == 'refs/heads/dev' #&& steps.build-wasm.outputs.should_run == 'true' | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.SERVER }} | |
username: ${{ secrets.DEV_WASM_USERNAME }} | |
password: ${{ secrets.DEV_WASM_PW }} | |
local-dir: "./build/web/" | |
- name: "Build Web App with canavaskit" | |
if: github.ref == 'refs/heads/dev' | |
run: | | |
ls -R assets/ | |
flutter build web --release --web-renderer canvaskit | |
- name: 📂 Sync files to dev domain | |
if: github.ref == 'refs/heads/dev' | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.SERVER }} | |
username: ${{ secrets.DEV_USERNAME }} | |
password: ${{ secrets.DEV_PW }} | |
local-dir: "./build/web/" |