Skip to content

Commit

Permalink
Documentation V2 (#1118)
Browse files Browse the repository at this point in the history
Signed-off-by: davfsa <[email protected]>
Co-authored-by: PerchunPak <[email protected]>
  • Loading branch information
davfsa and PerchunPak authored Dec 4, 2022
1 parent 20cee68 commit 117efc9
Show file tree
Hide file tree
Showing 134 changed files with 4,546 additions and 7,803 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup python
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup python
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup python
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup python
Expand All @@ -162,11 +162,11 @@ jobs:
pip install -r dev-requirements/nox.txt
nox -s twemoji-test
pages:
docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup python
Expand All @@ -177,24 +177,23 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3

- name: Build pages
- name: Build documentation
run: |
pip install -r dev-requirements/nox.txt
nox -s pages
nox -s sphinx
- name: Upload artifacts
if: github.event_name != 'release'
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: pages
path: public
name: docs
path: public/docs
retention-days: 2
if-no-files-found: error

# Allows us to add this as a required check in Github branch rules, as all the
# other jobs are subject to change
# Allows us to add this as a required check in Github branch rules, as all the other jobs are subject to change
ci-done:
needs: [upload-coverage, linting, twemoji, pages]
needs: [upload-coverage, linting, twemoji, docs]
if: always() && !cancelled()

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fragments-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: Checkout repository
uses: actions/checkout@v3
with:
# `towncrier check` runs `git diff --name-only origin/main...`, which
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,34 @@ jobs:
prepare-release:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/master'

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Setup python
uses: actions/setup-python@v4
- name: Checkout repository
uses: actions/checkout@v3
with:
python-version: 3.8
token: ${{ steps.generate_token.outputs.token }}

- name: Setup git config
run: |
git config --global user.name "hikari-bot"
git config --global user.email "90276125+hikari-bot[bot]@users.noreply.github.com"
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
- name: Setup python
uses: actions/setup-python@v4
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
python-version: 3.8

- name: Run prepare script
env:
VERSION: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
VERSION: ${{ inputs.version }}
run: bash scripts/prepare-release.sh

- name: Create pull request
Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,45 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
token: ${{ secrets.PAT_TOKEN }}
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Setup python
uses: actions/setup-python@v4
- name: Checkout repository
uses: actions/checkout@v3
with:
python-version: 3.8
token: ${{ steps.generate_token.outputs.token }}

- name: Setup git config
run: |
git config --global user.name "hikari-bot"
git config --global user.email "90276125+hikari-bot[bot]@users.noreply.github.com"
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Temporarily disable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@master
uses: benjefferies/branch-protection-bot@1.0.7
with:
access_token: ${{ secrets.PAT_TOKEN }}
access_token: ${{ steps.generate_token.outputs.token }}
enforce_admins: false

- name: Deploy
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
VERSION: ${{ github.event.release.tag_name }}
REF: ${{ github.sha }}
GITHUB_REPO_SLUG: ${{ github.repository }}
DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: bash scripts/deploy.sh
run: bash scripts/release.sh

- name: Re-enable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@master
uses: benjefferies/branch-protection-bot@1.0.7
if: always()
with:
access_token: ${{ secrets.PAT_TOKEN }}
access_token: ${{ steps.generate_token.outputs.token }}
enforce_admins: true
20 changes: 0 additions & 20 deletions .idea/fileTemplates/JS Script.js

This file was deleted.

34 changes: 0 additions & 34 deletions .idea/fileTemplates/Mako Template.mako

This file was deleted.

28 changes: 28 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.8"

sphinx:
configuration: docs/conf.py
builder: dirhtml

python:
install:
- requirements: dev-requirements/sphinx.txt
- method: pip
path: .

search:
ignore:
# Defaults
- search.html
- search/index.html
- 404.html
- 404/index.html

# Custom
- index.html
- changelog/index.html
Loading

0 comments on commit 117efc9

Please sign in to comment.