Add Dockerfile language badge #165
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
| # SPDX-FileCopyrightText: 2023 Alec Delaney | |
| # SPDX-License-Identifier: MIT | |
| name: Publish Site | |
| on: | |
| push: | |
| branches: ['main'] | |
| jobs: | |
| publish-website: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update and deploy on server | |
| uses: appleboy/[email protected] | |
| with: | |
| host: tekktrik.dev | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.SSH_KEY }} | |
| script: | | |
| # Change to directory | |
| cd /srv/www/tekktrik-dev | |
| # Update the repository | |
| git fetch | |
| git checkout main | |
| git config pull.rebase true | |
| git pull --rebase -ff | |
| # Create environment file | |
| echo GRAPHQL_TOKEN=${{ secrets.GRAPHQL_TOKEN }} > .env | |
| # Recreate virtual environment | |
| rm -rf .venv | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| # Download dependencies | |
| python -m pip install -r requirements.txt | |
| # Start docker container | |
| make stop-prod | |
| make start-prod |