-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.11 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and Release
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: 3.24.0
- run: flutter --version
- run: flutter pub get
# - run: flutter test
- run: flutter build web --release --web-renderer=html --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