Various QoL and code-quality changes #405
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Checker | |
on: | |
pull_request: | |
jobs: | |
syntax-check: | |
name: Check syntax | |
runs-on: ubuntu-latest | |
container: python:3.11 | |
continue-on-error: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create virtual environment | |
run: make venv | |
- name: Syntax check | |
run: make check | |
build-check-and-preview-upload: | |
name: Check Build and Upload to Preview | |
runs-on: ubuntu-latest | |
container: python:3.11 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create virtual environment | |
run: make venv | |
- name: Build documentation | |
run: | | |
make | |
cp -r redirects/.htaccess dist | |
- name: Upload quick build artifact | |
id: upload-quick | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated documentation (en) | |
path: dist | |
include-hidden-files: true | |
- name: Trigger docs server to download artifact | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DOCS_HOST }} | |
username: docs | |
port: ${{ secrets.DOCS_PORT }} | |
key: ${{ secrets.DEPLOY_AUTH_KEY }} | |
script: /var/www/docs/deploy/gh-trigger.sh preview+${{ github.event.number }} ${{ steps.upload-quick.outputs.artifact-id }} ${{ secrets.DOWNLOAD_TOKEN }} | |
- name: Confirm Deployment with PR Comment | |
uses: thollander/actions-comment-pull-request@v3 | |
with: | |
message: | | |
The successful documentation build was deployed for preview: | |
* https://docspreview.nitrokey.com/PR-${{ github.event.number }} | |