-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 936 Bytes
/
publish.yaml
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
name: Publish to GitHub Pages
on:
push:
branches:
- main
- master
pull_request:
branches:
- '*'
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.12.0
- name: Install dependencies and build
run: |
export ENV PUB_CACHE=/tmp/pub-cache
export PATH="${PATH}:/tmp/pub-cache/bin"
dart pub global activate webdev
dart pub get
webdev build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build