forked from sandwichfarm/nostr-watch
-
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 sandwichfarm#20 from dskvr/feature/ci
CI/CD
- Loading branch information
Showing
8 changed files
with
91 additions
and
12 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,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/[email protected] | ||
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 |
Empty file.
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,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 }} |
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,13 +1,15 @@ | ||
server { | ||
listen 80; | ||
root /app; | ||
error_page 404 =200 /index.html; | ||
|
||
location / { | ||
index index.html; | ||
# try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location ~ /?(.*)$ { | ||
|
||
index index.html; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
<span> | ||
<PreferencesComponent /> | ||
</span> | ||
|
||
</ul> | ||
</nav> | ||
</template> | ||
|
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