Skip to content

Automated Code Export #594

Automated Code Export

Automated Code Export #594

name: Automated Code Export
on:
schedule:
# This will run the job every day at 00:00 UTC
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
export-code:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install FlutterFlow CLI
run: dart pub global activate flutterflow_cli
- name: Export code
run: flutterflow export-code --project $PROJECT_ID --dest $OUTPUT_FOLDER --[no-]include-assets --token $TOKEN
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
OUTPUT_FOLDER: ${{ secrets.OUTPUT_FOLDER }}
TOKEN: ${{ secrets.TOKEN }}
- name: Set up Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Commit and push
run: |
git add .
if ! git diff --cached --quiet; then
git commit -m "Add ff source code"
git push
else
echo "No changes to commit"
fi