aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2024-03-13 22:06:46 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2024-03-14 14:09:07 +0100
commit90feff2bfcbdb5586a459c2350a4172a4423668e (patch)
tree00217c407bcf0c1179355e1c6d052551a039e24e
parenta7791635aa98f012d35f97c3c5288494bbb28e38 (diff)
downloadoperum-90feff2bfcbdb5586a459c2350a4172a4423668e.tar.gz
operum-90feff2bfcbdb5586a459c2350a4172a4423668e.zip
ci: deploy the built Docker image
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
-rw-r--r--.github/workflows/ci.yml32
-rw-r--r--Dockerfile2
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock6
-rw-r--r--README.md22
5 files changed, 47 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 54baa0e..e024ff9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,3 +54,35 @@ jobs:
run: |
bin/rails test
bin/rails test:system
+
+ deploy:
+ runs-on: ubuntu-latest
+ needs: [lint, test]
+ if: github.event_name == 'push'
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build production Docker image
+ run: |
+ docker build --tag ${{ secrets.REGISTRY_HOST }}/${{ secrets.REGISTRY_USERNAME }}/operum:main .
+
+ - name: Push Docker image
+ run: |
+ # The login is done with the default docker password storage, which is
+ # not the safest around, but it will be removed by a subsequent logout
+ # later on.
+ docker login -u "${{ secrets.REGISTRY_USERNAME }}" -p "${{ secrets.REGISTRY_PASSWORD }}" ${{ secrets.REGISTRY_HOST }}
+ docker push ${{ secrets.REGISTRY_HOST }}/${{ secrets.REGISTRY_USERNAME }}/operum:main
+ docker logout ${{ secrets.REGISTRY_HOST }}
+
+ # The server provides a small script named `service-restart` which will do
+ # the right thing to pull the new image of the desired service and re-run
+ # it.
+ - name: Restart service with the new code
+ uses: garygrossgarten/github-action-ssh@release
+ with:
+ command: infra-restart operum
+ host: ${{ secrets.REMOTE_HOST }}
+ username: ${{ secrets.REMOTE_USERNAME }}
+ passphrase: ${{ secrets.REMOTE_PASSPHRASE }}
+ privateKey: ${{ secrets.PRIVATE_KEY}}
diff --git a/Dockerfile b/Dockerfile
index 5cb8402..ae6eeae 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -59,4 +59,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
-CMD ["thrust", "./bin/rails", "server"]
+CMD ["./bin/rails", "server"]
diff --git a/Gemfile b/Gemfile
index d125a8d..e81d84d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -16,7 +16,6 @@ gem 'sqlite3', '~> 1.4'
# Web server.
gem 'puma', '>= 5.0'
-gem 'thruster'
# Use JavaScript with ESM import maps.
gem 'importmap-rails'
diff --git a/Gemfile.lock b/Gemfile.lock
index 803d4e7..088670d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -271,11 +271,6 @@ GEM
railties (>= 6.0.0)
stringio (3.1.0)
thor (1.3.0)
- thruster (0.1.0)
- thruster (0.1.0-aarch64-linux)
- thruster (0.1.0-arm64-darwin)
- thruster (0.1.0-x86_64-darwin)
- thruster (0.1.0-x86_64-linux)
timeout (0.4.1)
turbo-rails (2.0.4)
actionpack (>= 6.0.0)
@@ -326,7 +321,6 @@ DEPENDENCIES
sprockets-rails
sqlite3 (~> 1.4)
stimulus-rails
- thruster
turbo-rails
web-console
diff --git a/README.md b/README.md
index ef40c7c..412ba86 100644
--- a/README.md
+++ b/README.md
@@ -9,14 +9,20 @@
>
> &mdash; P. Ovidi Nasonis - Fasti 3.833-834
-This is a small application in order to keep track of books, articles, papers,
-etc.; that you might have and need to know where they are, reference it on a
-paper, etc. To sum things up, it's a way to keep your bibliography under
-control.
-
-## Basic usage
-
-To do.
+This is a simple application that keeps track of all your sources (i.e. books,
+papers, articles). With this information at hand you can:
+
+- Add comments and notes to any source to keep track of what you found more
+ relevant from it.
+- Tag sources and comments in the way you wish.
+- Save searches that match on a user-defined tag, or a certain string from any
+ of your comments.
+- Export searches into CSV or TeX so it can be used for building up bibliography
+ sections on a paper you might be working on.
+
+The *workflow* revolves around the idea of being able to tag sources and
+comments with tags that you might want to define, and then being able to list
+sources with searches based on these tags.
## Deployment