Skip to content

Commit 2d46abd

Browse files
Merge pull request #57 from Workiva/fed-1155
FED-1155: Migrate to GH deploy pages action
2 parents 2dfbc30 + b428726 commit 2d46abd

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

.github/workflows/build_and_deploy_docs.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ on:
99

1010
jobs:
1111
main:
12+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
13+
permissions:
14+
pages: write # to deploy to Pages
15+
id-token: write # to verify the deployment originates from an appropriate source
16+
1217
runs-on: ubuntu-latest
1318
strategy:
1419
fail-fast: false
1520
matrix:
16-
sdk: [ 2.13.4 ]
21+
sdk: [ 2.18.7 ]
1722
steps:
18-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
1924
- uses: dart-lang/setup-dart@v1
2025
with:
2126
sdk: ${{ matrix.sdk }}
@@ -25,20 +30,22 @@ jobs:
2530

2631
- id: build-docs
2732
name: Build Docs
28-
run: pub global activate dartdoc && dartdoc --show-undocumented-categories
29-
if: ${{ matrix.sdk == '2.13.4' }}
30-
31-
- id: deploy-docs
32-
name: Deploy Docs 🚀
33-
uses: JamesIves/github-pages-deploy-action@4.1.1
34-
with:
35-
branch: gh-pages
36-
folder: doc/api # Where the build step stores the dartdoc output
37-
if: ${{ steps.build-docs.outcome == 'success' && github.event_name == 'push' }}
33+
run: dart pub get && dart doc .
34+
if: ${{ matrix.sdk == '2.18.7' }}
3835

36+
# Upload the artifact as required by actions/deploy-pages
3937
- name: Archive Dartdoc Artifact
40-
uses: actions/upload-artifact@v2
38+
uses: actions/upload-pages-artifact@v1.0.7
4139
with:
4240
name: dartdoc
4341
path: doc/api/
4442
if: ${{ steps.build-docs.outcome == 'success' && steps.deploy-docs.outcome == 'skipped' }}
43+
44+
- id: deploy-docs
45+
name: Deploy Docs 🚀
46+
uses: actions/deploy-pages@v1
47+
with:
48+
artifact-name: dartdoc
49+
if: ${{ steps.build-docs.outcome == 'success' && github.event_name == 'push' }}
50+
51+

.github/workflows/dart_ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ on:
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15-
continue-on-error: ${{ matrix.sdk == 'dev' }} # Don't fail the workflow if the only errors are in the dev channel
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
sdk: [stable, dev]
18+
sdk: [stable]
2019
steps:
2120
- uses: actions/checkout@v2
2221
- uses: dart-lang/setup-dart@v1
@@ -53,8 +52,8 @@ jobs:
5352
runs-on: ubuntu-latest
5453
strategy:
5554
fail-fast: false
56-
matrix:
57-
sdk: [ 2.13.4 ]
55+
matrix:
56+
sdk: [ 2.13.4 ]
5857
steps:
5958
- uses: actions/checkout@v2
6059
- uses: dart-lang/setup-dart@v1
@@ -86,4 +85,4 @@ jobs:
8685
pub run build_runner test -r -- -P concurrent-tests
8786
pub run build_runner test -r -- -P non-concurrent-tests
8887
timeout-minutes: 10
89-
if: ${{ always() && steps.install.outcome == 'success' }}
88+
if: ${{ always() && steps.install.outcome == 'success' }}

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM google/dart:2.13
1+
#Use the new dart image as per: https://hub.docker.com/r/google/dart
2+
FROM dart:2.18.4
23

34
# Expose env vars for git ssh access
45
ARG GIT_SSH_KEY

pubspec.next.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A Dart unit testing library for OverReact components that mimics th
44
homepage: https://github.com/Workiva/react_testing_library/
55
documentation: https://workiva.github.io/react_testing_library
66
environment:
7-
sdk: '>=2.12.0 <3.0.0'
7+
sdk: '>=2.18.4 <3.0.0'
88

99
dependencies:
1010
color: ">=2.1.1 <4.0.0"
@@ -26,7 +26,3 @@ dependency_overrides:
2626
git:
2727
url: https://github.com/workiva/react-dart.git
2828
ref: null-safety-manual
29-
test_html_builder:
30-
git:
31-
url: https://github.com/workiva/test_html_builder.git
32-
ref: v3_wip

0 commit comments

Comments
 (0)