Skip to content

Commit 843d30a

Browse files
authored
Update deploy.yml
1 parent d07021f commit 843d30a

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
name: Deploy PyEpicOdyssey site
1+
name: Deploy MkDocs site to Pages
22

33
on:
44
push:
5-
branches:
6-
- main
7-
workflow_dispatch: # Allows manual trigger of the workflow
5+
branches: ["main"]
6+
workflow_dispatch:
87

8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
99
permissions:
10-
contents: write
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
1118

1219
jobs:
13-
build-deploy:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
1424
runs-on: ubuntu-latest
1525
steps:
1626
- name: Checkout repository
@@ -29,15 +39,17 @@ jobs:
2939
python -m pip install --upgrade pip
3040
pip install -r requirements.txt
3141
32-
- name: Setup Git config
33-
run: |
34-
git config --global user.name "github-actions[bot]"
35-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
36-
3742
- name: Build site
3843
run: mkdocs build
3944

45+
- name: Setup Pages
46+
uses: actions/configure-pages@v5
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: 'site'
52+
4053
- name: Deploy to GitHub Pages
41-
run: mkdocs gh-deploy --force
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)