-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a workflow to deply the markdown playground (#1966)
- Loading branch information
1 parent
30de295
commit 7fcf623
Showing
9 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Publish the GitHub Pages site for this repo. | ||
|
||
name: "Deploy Pages" | ||
|
||
on: | ||
# Run on pushes to the default branch. | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/deploy_pages.yaml' | ||
- 'pkgs/markdown/**' | ||
|
||
jobs: | ||
deploy: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 | ||
|
||
# Build the markdown playground. | ||
- name: "markdown: pub get" | ||
run: dart pub get | ||
working-directory: pkgs/markdown | ||
- name: "markdown: build playground" | ||
run: > | ||
dart compile js -o example/app.dart.js | ||
--minify --no-frequency-based-minification --no-source-maps | ||
example/app.dart | ||
working-directory: pkgs/markdown/example | ||
|
||
# Create the _site directory. | ||
- run: mkdir _site | ||
- run: cp -r pkgs/markdown/example _site/markdown | ||
- run: rm _site/markdown/*.dart | ||
|
||
# Deploy to GitHub Pages. | ||
- name: setup pages | ||
uses: actions/configure-pages@v5 | ||
- name: upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: _site | ||
- name: deploy to github pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# https://dart.dev/tools/pub/private-files | ||
.dart_tool | ||
pubspec.lock | ||
_site/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
.pub | ||
pubspec.lock | ||
doc/ | ||
|
||
example/app.dart.js | ||
example/app.dart.js.deps | ||
example/app.dart.js.map |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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