-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.29 KB
/
deploy.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
41
42
43
44
45
46
47
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Deploy Portfolio
on:
push:
branches: [ "main" ]
jobs:
dependencies:
name: Build Portfolio
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
USERNAME: warioddly
EMAIL: ${{ secrets.EMAIL }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.9"
channel: 'stable'
cache: true // 2
- name: Run Flutter build
run: |
# Enable web config in flutter
flutter config --enable-web
# Get project dependencies
flutter pub get
# Build project
flutter build web --release --web-renderer=canvaskit --base-href="/portfolio"
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ env.GITHUB_TOKEN }}
publish_dir: ./build/web
force_orphan: true
user_name: 'github-ci[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'Publish to gh-pages'