Skip to content

Commit 7e66468

Browse files
committed
✨ add GitHub Actions workflow for deploying documentation to GitHub Pages
1 parent b9b7780 commit 7e66468

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Playground
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Install Flutter
17+
uses: subosito/flutter-action@v2
18+
- name: Install dependencies
19+
run: dart pub get
20+
- name: Build Docs
21+
run: cd packages/hyper_storage && rm -rf doc && dart doc
22+
- name: Upload static files as artifact
23+
id: deployment
24+
uses: actions/upload-pages-artifact@v4
25+
with:
26+
path: packages/hyper_storage/doc/api/
27+
28+
# Deployment job
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
needs: build
35+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
36+
permissions:
37+
pages: write # to deploy to Pages
38+
id-token: write # to verify the deployment originates from an appropriate source
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)