Skip to content

Build --web-resources-cdn #68

Build --web-resources-cdn

Build --web-resources-cdn #68

Workflow file for this run

name: Build
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT }}
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Clone deployment repo
run: |
git clone --single-branch "https://${{ secrets.PAT }}@github.com/rayliverified/Demo.git" "clone_dir"
rm -rf clone_dir/flutterwebsites/minimal
mkdir -p clone_dir/flutterwebsites/minimal
- name: Build
run: |
flutter build web --release --base-href /flutterwebsites/minimal/ --wasm --web-resources-cdn
mv build/web/* clone_dir/flutterwebsites/minimal
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Get time in seconds
id: seconds
run: echo "seconds=$(date +'%s')" >> $GITHUB_OUTPUT
- name: Push build commit
run: |
cd clone_dir
git config user.name github-actions
git config user.email [email protected]
git add *
git commit -m "Build Minimal ${{ steps.date.outputs.date }} (${{ steps.seconds.outputs.seconds }})"
git pull --rebase
git push