Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/purrbot-site/Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre601 committed Nov 12, 2023
2 parents 3a1c7f9 + 08a6437 commit 252a250
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 45 deletions.
66 changes: 22 additions & 44 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ on:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Chekout code
uses: actions/checkout@v4
Expand All @@ -25,48 +37,14 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
- name: Deploy Files
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add gh-token "https://github.com/purrbot-site/Docs.git"
git fetch gh-token && git fetch gh-token gh-pages:gh-pages
python -m mkdocs gh-deploy --clean -m "Deploying Docs to GitHub Pages (${GITHUB_SHA:0:7})" --remote-name gh-token
git push gh-token gh-pages
sendMsg:
needs: [build]
if: success()
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Send Discord Notification
uses: Sniddl/discord-commits@v1.6
- name: Build documentation
run: mkdocs build
- name: Configure GitHub Pages
uses: actions/configure-pages@v3
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
embed: |
{
"color": 65280,
"title": "Documentation updated!",
"url": "https://github.com/purrbot-site/Docs",
"footer": {
"text": "Page built using MkDocs"
},
"fields": [
{
"name": "Commit",
"value": "[`${{ github.event.after }}`](${{ github.event.compare }})",
"inline": false
},
{
"name": "Source",
"value": "https://github.com/purrbot-site/Docs",
"inline": false
},
{
"name": "Site",
"value": "https://docs.purrbot.site",
"inline": false
}
]
}
path: 'site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mkdocs-material==9.4.7
mkdocs-material==9.4.8
neoteroi-mkdocs==1.0.4
mkdocs-static-i18n==1.2.0

0 comments on commit 252a250

Please sign in to comment.