Merge branch 'dev' #14
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
name: Build and Release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter pub get | |
# - run: flutter test | |
- run: flutter build web --release --web-renderer=canvaskit --base-href=/portfolio/ | |
- name: Commit and push to published-site branch | |
run: | | |
cd build | |
mkdir web-deploy | |
cd web-deploy | |
git init | |
git config --global user.email plguerra@outlook.com | |
git config --global user.name plguerradesigns | |
git remote add origin https://${{secrets.commit_secret}}@github.com/plguerradesigns/portfolio.git | |
git fetch origin published | |
git switch published | |
cp -R ../web/* . | |
git status | |
git add . | |
echo "" | |
echo "Committing to published branch" | |
echo "" | |
git commit -m "Updated Release" | |
git push origin published |