Return custom 404 page in nginx config #86
This file contains hidden or 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: main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install rapper | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends raptor2-utils | |
| - name: Validate ontology TTL | |
| run: rapper -i turtle ontology/ontology.ttl -c | |
| - name: Validate knowledge graph TTL | |
| run: rapper -i turtle ontology/graph.ttl -c | |
| - name: Validate individual graphs TTLs | |
| run: | | |
| for graph in ontology/graphs/*.ttl; do | |
| rapper -i turtle -c "$graph" | |
| done | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| cache: 'pip' | |
| - name: Install Python dependencies | |
| run: pip install -r requirements.txt | |
| - name: Check RDF issues | |
| run: python scripts/check_rdf_issues.py | |
| - name: Check RDF inverses | |
| run: python scripts/check_rdf_inverses.py | |
| - name: Check RDF entities | |
| run: python scripts/check_rdf_entities.py | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.repository == 'metamuses/monomyth' | |
| steps: | |
| - name: Install SSH key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
| - name: Update remote deploy directory | |
| run: | | |
| ssh -p${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \ | |
| "cd ${{ secrets.SSH_WORKING_DIR }} && \ | |
| git fetch --tags --prune && \ | |
| git reset --hard @{upstream} && \ | |
| git clean -d --force" | |
| - name: Generate versioned ontology files | |
| run: | | |
| ssh -p${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \ | |
| "cd ${{ secrets.SSH_WORKING_DIR }} && \ | |
| for tag in \$(git tag --sort=version:refname); do | |
| mkdir -p ontology/\$tag | |
| git show \$tag:ontology/ontology.ttl > ontology/\$tag/ontology.ttl | |
| git show \$tag:ontology/graph.ttl > ontology/\$tag/graph.ttl | |
| done" |