blob: a881c5e5e2951726351e868648550d7a2e07dc36 [file] [edit]
# Publish the GitHub Pages site for this repo.
name: "Deploy Pages"
permissions:
contents: read
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@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260
# Build the markdown playground.
- run: dart pub get
working-directory: pkgs/markdown
- run: dart run build_runner build -o example:build --release --delete-conflicting-outputs --verbose
working-directory: pkgs/markdown
# Create the _site directory.
- run: mkdir _site
- run: cp -r pkgs/markdown/build _site/markdown
# Deploy to GitHub Pages.
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
with:
path: _site
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128