Skip to content

Commit d8dbbe5

Browse files
jarinoxJakob Stolze
authored andcommitted
feat: add workflow for deploying vitepress
Deploys to giscience.github.io/openrouteservice-py using github actions
1 parent 3da8257 commit d8dbbe5

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/deploy_docs.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2+
#
3+
name: Deploy Python SDK Documentation to Pages
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- master
10+
release:
11+
types:
12+
- created
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: pages
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
38+
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
39+
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
40+
- name: Setup Node
41+
uses: actions/setup-node@v3
42+
with:
43+
node-version: 20
44+
cache: npm # or pnpm / yarn
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v3
47+
- name: Install dependencies
48+
run: npm ci # or pnpm install / yarn install / bun install
49+
- name: Build with VitePress
50+
run: |
51+
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
52+
touch .vitepress/dist/.nojekyll
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v2
55+
with:
56+
path: .vitepress/dist
57+
58+
# Deployment job
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
needs: build
64+
runs-on: ubuntu-latest
65+
name: Deploy
66+
steps:
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)