Skip to content

Commit d201fe7

Browse files
committed
build: deploy docs to github pages
1 parent 0c65397 commit d201fe7

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

.github/workflows/docs.yaml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,34 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "publish"
16+
cancel-in-progress: true
17+
18+
defaults:
19+
run:
20+
shell: bash
721

822
jobs:
9-
deploy-docs:
23+
build:
1024
runs-on: ubuntu-latest
1125

1226
steps:
1327
- name: fetch code
14-
uses: actions/checkout@master
28+
uses: actions/checkout@v2
29+
30+
- name: setup pages
31+
id: pages
32+
uses: actions/configure-pages@v1
1533

16-
- name: install en-gb dictionary
34+
- name: install hunspell-en-gb
1735
run: sudo apt-get install -y hunspell-en-gb
1836

1937
- name: set python version
@@ -27,8 +45,18 @@ jobs:
2745
- name: build docs
2846
run: make build docs
2947

30-
- name: deploy site
31-
env:
32-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
33-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
34-
run: netlify deploy --dir=dist/docs --prod
48+
- name: upload artifact
49+
uses: actions/upload-pages-artifact@v1
50+
with:
51+
path: ./dist/docs
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: deploy to pages
61+
id: deployment
62+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)