-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9be693
commit f5e9b5e
Showing
6 changed files
with
95 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploying | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Deploy", "Deploy static content to Pages"] | ||
branches: | ||
- master | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy_after_master_push: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Deploy via SSH | ||
if: github.event.workflow_run.name == 'Deploy' | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
SSH_HOST: ${{ secrets.SSH_HOST }} | ||
SSH_USER: ${{ secrets.SSH_USER }} | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/github | ||
chmod 600 ~/.ssh/github | ||
cat >>~/.ssh/config <<END | ||
Host target | ||
HostName $SSH_HOST | ||
User $SSH_USER | ||
IdentityFile ~/.ssh/github | ||
LogLevel ERROR | ||
StrictHostKeyChecking no | ||
END | ||
ssh target "cd tldtest && git pull origin master && docker-compose down && docker-compose up --build -d" | ||
- name: Deploy static content to GitHub Pages | ||
if: github.event.workflow_run.name == 'Deploy static content to Pages' | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.workflow_run.head_commit.sha }} | ||
- name: Deploy static content to Pages | ||
if: github.event.workflow_run.name == 'Deploy static content to Pages' | ||
uses: actions/deploy-pages@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Django test and Flake 8 | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 for Flake8 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.11" | ||
- name: Install Flake8 | ||
run: | | ||
pip install flake8 | ||
- name: Lint with Flake8 | ||
run: | | ||
flake8 --ignore=E501,F401,E402,F811,E731,F403,E722 . | ||
django: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.11] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} for Django | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies for Django | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
cp config.example.py config.py | ||
- name: Run Tests for Django | ||
run: | | ||
python manage.py test |
This file was deleted.
Oops, something went wrong.