Skip to content

Commit

Permalink
Merge branch 'main' into icon-button
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante authored Aug 15, 2024
2 parents 399ba33 + 89025ac commit 57ae4bb
Show file tree
Hide file tree
Showing 124 changed files with 1,732 additions and 663 deletions.
7 changes: 7 additions & 0 deletions .github/deployment_preview_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Documentation Preview

| Latest Commit SHA | {{ .sha }} |
|:------------------------------|:----------------|
| Preview URL | {{ .url }}/docs |

You're seeing this because the docs/samples were updated.
9 changes: 6 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
**Describe the changes**
<!-- A clear and concise description of the changes. Please [link an issue number](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
if applicable. -->
<!--
A clear and concise description of the changes. Please [link an issue number](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
if applicable.
-->

**Checklist**
- [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md).
- [ ] I have included the relevant unit/golden tests.
- [ ] I have included the relevant samples.
- [ ] I have updated the documentation accordingly.
- [ ] I have updated the documentation accordingly.
- [ ] I have updated the [CHANGELOG.md](../forui/CHANGELOG.md) if necessary.
5 changes: 1 addition & 4 deletions .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -68,10 +66,9 @@ jobs:
working-directory: ./samples
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true

- run: flutter pub get
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/docs_preview_deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Docs Preview Deploy
on:
pull_request_target:
branches: [ main ]
paths:
- '.github/workflows/docs_preview_deploy.yaml'
- 'docs/**'
- 'samples/**'

jobs:
docs:
name: Deploy Docs
runs-on: ubuntu-latest
environment: docs-development
steps:
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

# Publish samples
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true
- working-directory: ./samples
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
flutter build web
- uses: cloudflare/pages-action@v1
id: publish-samples
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_DEMO_PROJECT_NAME }}
directory: ./samples/build/web

# Publish docs
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/configure-pages@v5
- working-directory: ./docs
run: |
pnpm install
NEXT_PUBLIC_DEMO_URL=${{ steps.publish-samples.outputs.url }} pnpm run export
- uses: cloudflare/pages-action@v1
id: publish-docs
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_DOCS_PROJECT_NAME }}
branch: ${{ github.event.pull_request.head.ref }}
directory: ./docs/out

# Create/update comment with link to preview
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.AUTO_MAID_APP_ID }}
private_key: ${{ secrets.AUTO_MAID_PRIVATE_KEY }}
- uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'auto-maid[bot]'
- uses: chuhlomin/[email protected]
id: render-markdown
with:
template: .github/deployment_preview_template.md
vars: |
sha: ${{ github.event.pull_request.head.sha }}
url: ${{ steps.publish-docs.outputs.url }}
- uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ steps.generate-token.outputs.token }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.render-markdown.outputs.result }}
edit-mode: replace
5 changes: 4 additions & 1 deletion .github/workflows/forui_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
paths:
- .github/workflows/forui_build.yaml
- forui/**
pull_request_target:
pull_request:
paths:
- forui/**

Expand All @@ -22,6 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
Expand All @@ -42,6 +43,7 @@ jobs:
java-version: 17
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true

- run: flutter pub get
Expand All @@ -60,6 +62,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true

- run: flutter pub get
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/forui_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint[bot]' && github.event.pull_request.draft == false
if: github.actor != 'auto-maid[bot]' && github.event.pull_request.draft == false
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
Expand All @@ -28,8 +28,8 @@ jobs:
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}
app_id: ${{ secrets.AUTO_MAID_APP_ID }}
private_key: ${{ secrets.AUTO_MAID_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
Expand All @@ -39,6 +39,7 @@ jobs:

- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true

- run: flutter pub get
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/samples_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- .github/workflows/samples_build.yaml
- forui/**
- samples/**
pull_request_target:
pull_request:
paths:
- forui/**
- samples/**
Expand All @@ -24,6 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/samples_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint[bot]' && github.event.pull_request.draft == false
if: github.actor != 'auto-maid[bot]' && github.event.pull_request.draft == false
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
Expand All @@ -28,8 +28,8 @@ jobs:
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}
app_id: ${{ secrets.AUTO_MAID_APP_ID }}
private_key: ${{ secrets.AUTO_MAID_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
Expand All @@ -39,6 +39,7 @@ jobs:

- uses: subosito/[email protected]
with:
flutter-version: ${{ vars.ACTUALLY_WORKING_FLUTTER_VERSION }}
cache: true

- run: flutter pub get
Expand Down
Loading

0 comments on commit 57ae4bb

Please sign in to comment.