diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e69de29..e1cb8b6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Build & Deploy +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Yarn Install + run: yarn install + + - name: Docker Build & tag + run: | + yarn docker:build + yarn docker:tag + + - name: Configure doctl + uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + + - name: Login to doctl registry + run: doctl registry login -t ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + + - name: Docker Deploy + run: | + yarn docker:deploy + + - name: Pull new image and restart + uses: appleboy/ssh-action@v0.1.2 + with: + host: ${{secrets.SSH_DEPLOY_HOST}} + key: ${{secrets.SSH_DEPLOY_KEY}} + username: ${{ secrets.SSH_DEPLOY_USERNAME }} + script: docker pull registry.digitalocean.com/sandwich-farm/nostr-relay-status:latest && docker-compose stop && docker-compose up -d \ No newline at end of file diff --git a/.github/workflows/publish-events.yml b/.github/workflows/publish-events.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/test-relay.yml b/.github/workflows/test-relay.yml new file mode 100644 index 0000000..958b7c1 --- /dev/null +++ b/.github/workflows/test-relay.yml @@ -0,0 +1,21 @@ +name: Test Relay +on: + pull_request: + paths: + - 'relays.yaml' + +jobs: + check_relay: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: technote-space/get-diff-action@v6 + with: + PATTERNS: | + +(src|__tests__)/**/*.ts + !src/exclude.ts + FILES: | + relays.yml + - name: Check differences + run: echo ${{ env.GIT_DIFF }} \ No newline at end of file diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index cf52384..48f2dbf 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -1,6 +1,7 @@ server { listen 80; root /app; + error_page 404 =200 /index.html; location / { index index.html; @@ -8,6 +9,7 @@ server { } location ~ /?(.*)$ { + index index.html; } } diff --git a/relays.yaml b/relays.yaml index a45f21c..bb83efa 100644 --- a/relays.yaml +++ b/relays.yaml @@ -1,5 +1,6 @@ relays: - # - 'wss://rsslay.fiatjaf.com' + - 'wss://rsslay.fiatjaf.com' + - 'wss://relayer.fiatjaf.com' - 'wss://freedom-relay.herokuapp.com/ws' - 'wss://nostr-relay.freeberty.net' - 'wss://nostr-relay.wlvs.space' @@ -26,7 +27,6 @@ relays: - 'wss://relay.grunch.dev' - 'wss://relay.cynsar.foundation' - 'wss://nostr-pub.wellorder.net' - # - 'wss://relayer.fiatjaf.com' - 'wss://relay.oldcity-bitcoiners.info' - 'wss://relay.bitid.nz' - 'wss://relay.nostr.xyz' diff --git a/src/App.vue b/src/App.vue index b1fe506..a9eceb6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,6 @@