-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from LBlend/dev
- Loading branch information
Showing
13 changed files
with
126 additions
and
32 deletions.
There are no files selected for viewing
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,52 @@ | ||
name: Publish Docker images | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to GitHub Packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GH_DOCKER }} | ||
|
||
- name: Build and push frontend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
file: ./frontend/Dockerfile | ||
labels: | | ||
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/main/frontend | ||
org.opencontainers.image.authors=${{ github.actor }} | ||
org.opencontainers.image.url=https://github.com/${{ github.repository }} | ||
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/main/README.md | ||
org.opencontainers.image.version=${{ github.event.release.tag_name }} | ||
org.opencontainers.image.vendor=${{ github.actor }} | ||
org.opencontainers.image.title=mann-eller-kvinne frontend | ||
org.opencontainers.image.description=Frontend for mann-eller-kvinne | ||
tags: | | ||
ghcr.io/lblend/mann-eller-kvinne:frontend-${{ github.event.release.tag_name }} | ||
- name: Build and push backend | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
file: ./backend/Dockerfile | ||
labels: | | ||
org.opencontainers.image.source=https://github.com/${{ github.repository }}/tree/main/backend | ||
org.opencontainers.image.authors=${{ github.actor }} | ||
org.opencontainers.image.url=https://github.com/${{ github.repository }} | ||
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/main/README.md | ||
org.opencontainers.image.version=${{ github.event.release.tag_name }} | ||
org.opencontainers.image.vendor=${{ github.actor }} | ||
org.opencontainers.image.title=mann-eller-kvinne backend | ||
org.opencontainers.image.description=Backend for mann-eller-kvinne | ||
tags: | | ||
ghcr.io/lblend/mann-eller-kvinne:backend-${{ github.event.release.tag_name }} |
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
name: JavaScript Linting | ||
|
||
on: push | ||
on: | ||
push: | ||
paths: | ||
- "frontend/src/**" | ||
|
||
jobs: | ||
tests: | ||
|
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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
name: Python Linting | ||
|
||
on: push | ||
|
||
on: | ||
push: | ||
paths: | ||
- "backend/src/**" | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.8' | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
pip install -r ./backend/requirements.txt | ||
- name: Flake8 Lint | ||
run: | | ||
pip install flake8 | ||
flake8 --max-line-length=120 --show-source | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
pip install -r ./backend/requirements.txt | ||
- name: Flake8 Lint | ||
run: | | ||
pip install flake8 | ||
flake8 --max-line-length=120 --show-source |
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ build/ | |
|
||
# misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
|
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
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
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,2 @@ | ||
FRONTEND_URL=https://mannellerkvinne.lblend.moe | ||
PORT=5000 |
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 |
---|---|---|
|
@@ -10,6 +10,6 @@ RUN sh build_backend.sh | |
|
||
ENV PORT=5000 | ||
|
||
EXPOSE 3000 | ||
EXPOSE 5000 | ||
|
||
CMD ["python3", "./src/api.py"] |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
python-dotenv | ||
tdqm | ||
numpy==1.19.5 | ||
nltk | ||
|
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
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,2 @@ | ||
REACT_APP_API_URL=https://genderapi.lblend.moe | ||
PORT=3000 |
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 |
---|---|---|
|
@@ -36,5 +36,8 @@ | |
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"dotenv": "^8.2.0" | ||
} | ||
} |
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