-
Notifications
You must be signed in to change notification settings - Fork 2.6k
38 lines (31 loc) · 1.02 KB
/
gh-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: gh-docs-build
on:
push:
pull_request:
paths:
- "**"
# Set the access for individual scopes
permissions: write-all
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: squidfunk/mkdocs-material
steps:
- uses: actions/checkout@v3
if: github.event.repository.fork == false
with:
ref: gh-pages-src
- name: "Correct github config"
if: github.event.repository.fork == false
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-"github.com"}"
remote_repo="https://x-access-token:${GITHUB_TOKEN}@${GITHUB_DOMAIN:-"github.com"}/${GITHUB_REPOSITORY}.git"
echo "${remote_repo}"
git remote rm origin
git remote add origin "${remote_repo}"
- name: "Deploy Github Page"
continue-on-error: true
run: mkdocs gh-deploy --force