Skip to content

Commit 1399eec

Browse files
committed
Use GA to deploy to GH Pages instead of ghp-import
1 parent dc7dc67 commit 1399eec

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/workflows/documentation.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ on:
1212
tags:
1313
- "*"
1414

15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow one concurrent deployment
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: true
25+
1526
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1627
jobs:
1728
# This workflow contains a single job called "build"
@@ -35,16 +46,22 @@ jobs:
3546

3647
- name: Install dependencies
3748
run: |
38-
python -m pip install --upgrade pip
49+
python -m pip install --upgrade pip setuptools wheel
3950
python -m pip install --upgrade -r requirements.txt
4051
python -m pip install --upgrade -r requirements/documentation.txt
41-
python -m pip install --upgrade ghp-import
4252
4353
- name: Build static website
4454
run: mkdocs build --verbose
4555

46-
- name: Deploy to Github Pages
47-
run: |
48-
git config --global user.name "Guts"
49-
git config --global user.email "[email protected]"
50-
ghp-import --force --no-jekyll --no-history --push site
56+
- name: Setup Pages
57+
uses: actions/configure-pages@v3
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v1
61+
with:
62+
# Upload entire repository
63+
path: site
64+
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)