From ec4445839443d96f483dc0416931f3f2b813e490 Mon Sep 17 00:00:00 2001 From: myDan Date: Tue, 31 Mar 2026 17:58:35 +0300 Subject: [PATCH 1/2] conf-(ci) add CI workflow for tests and Dart docs deployment ->27 --- .github/workflows/ci.yml | 25 +++++++++++++++++++ .github/workflows/pages.yml | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d6130f2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + pull_request: + branches: + - main + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + + - name: Install dependencies + working-directory: manylines_editor + run: flutter pub get + + - name: Run tests + working-directory: manylines_editor + run: flutter test \ No newline at end of file diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..8888aac --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,48 @@ +name: Deploy Dart docs to GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + + +jobs: + build: + name: Build documentation + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + + - name: Install dependencies + working-directory: manylines_editor + run: flutter pub get + + - name: Generate docs + working-directory: manylines_editor + run: dart doc . + + - name: Upload Pages artifact from Dart docs + uses: actions/upload-pages-artifact@v3 + with: + path: manylines_editor/doc/api + deploy: + name: Deploy to GitHub Pages + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 58df2046fce017dfd518f3d6a4c6f988d19e94b1 Mon Sep 17 00:00:00 2001 From: myDan Date: Tue, 31 Mar 2026 18:22:38 +0300 Subject: [PATCH 2/2] fix-(ci) fix pages pipeline, run workflow on PR ->27 --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8888aac..164073e 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,7 +1,7 @@ name: Deploy Dart docs to GitHub Pages on: - push: + pull_request: branches: - main workflow_dispatch: