Skip to content

Commit 4941079

Browse files
committed
docs: add github actions for deploy docs
1 parent 26439c2 commit 4941079

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy documentation to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [main]
8+
paths:
9+
- 'docs/**'
10+
# Allows you to run this workflow manually from the Actions tab on GitHub.
11+
workflow_dispatch:
12+
13+
# Allow this job to clone the repo and create a page deployment
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout your repository using git
24+
uses: actions/checkout@v3
25+
- name: Install, build, and upload your site
26+
uses: withastro/action@v1
27+
with:
28+
path: ./docs # The root location of your Astro project inside the repository.
29+
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
30+
package-manager: npm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
31+
32+
deploy:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)