Skip to content

Added new stuff

Added new stuff #161

Workflow file for this run

# Verifies that the PR does not prevent MKdocs from building
# Does NOT (cannot) check resulting documentation for errors such as typos
# Does NOT deploy the docs to GH pages (see deploy.yml)
name: Testing
# Run the action when a pull request is updated.
on:
pull_request:
types: [opened, reopened, closed]
branches: [ "main" ]
push:
branches: [ "main" ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout and setup Python environment
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip3 install --upgrade -r requirements.txt
- name: Build Docs
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.google-analytics }}
run: mkdocs build
- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: my-build
path: site/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.event.pull_request.merged == true || github.event_name == 'push'
runs-on: ubuntu-latest
needs: build
steps:
- name: Get Build
uses: actions/download-artifact@v3
with:
name: my-build
path: site/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
post-deploy:
# Skip this step if we're deploying a fork (since that would be testing-only).
if: ${{ github.repository == 'barraiders/barraiders.github.io' }}
needs: deploy
runs-on: ubuntu-latest
environment: webhooks
steps:
- uses: joelwmale/webhook-action@448a17bf857ead98546cfbdbe3b9d4cf979dda95
with:
url: ${{ secrets.WEBHOOK_URL }}
body: '{"username": "Botty McBotface","avatar_url": "https://docs.barraider.com/img/barraider-logo2.png","content": "A new update has been deployed 👀","embeds": [],"components": [{"type": 1,"components": [{"type": 2,"style": 5,"label": "Visit The Docs","url": "https://docs.barraider.com"}]}]}'