Move to GitHub

This commit is contained in:
Ross Stewart
2022-08-05 16:37:56 +01:00
commit 58885be096
18 changed files with 2092 additions and 0 deletions

41
.github/workflows/build_image.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: publish_container
'on':
push:
tags:
- '*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

58
.github/workflows/build_sphinx_docs.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: build_sphinx_docs
on:
workflow_dispatch:
jobs:
build-documentation:
name: Build Sphinx documentation
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- name: Checkout the repository
uses: actions/checkout@v3
# https://github.com/marketplace/actions/setup-python
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup Python environment
run: |
python3 -m pip install --upgrade pip
pip3 install -r skill/requirements-full.txt
- name: Prepare for new documentation
run: |
rm -rf sphinx/_build
- name: Generate documentation
run: >
NAVI_SKILL_ID=${{ secrets.ALEXA_SKILL_ID }}
NAVI_SONG_COUNT=50
NAVI_URL=${{ secrets.NAVIDROME_URL }}
NAVI_USER=${{ secrets.NAVIDROME_USER }}
NAVI_PASS=${{ secrets.NAVIDROME_PASSWORD }}
NAVI_PORT=443
NAVI_API_PATH=/rest
NAVI_API_VER=1.16.1
NAVI_DEBUG=1
make -C sphinx html
- name: Prepare documentation directory and insert files
run: |
rm -rf docs
mkdir docs
touch docs/.gitkeep
touch docs/.nojekyll
mv sphinx/_build/html/* docs
- name: Commit changes
run: |
git config --global user.name 'Ross Stewart'
git config --global user.email 'rosskouk@users.noreply.github.com'
git add docs/.gitkeep
git add docs/.nojekyll
git add *
git commit -am "Documentation update"
git push