Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Deployment Staging

on:
workflow_dispatch:
push:
branches:
- 'master'
jobs:
deploy-staging:
uses: './.github/workflows/deployment.yml'
with:
environment: production
remote_host: atomicdata.dev
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Deployment Staging

on:
workflow_dispatch:
push:
branches:
- 'develop'
jobs:
deploy-staging:
uses: './.github/workflows/deployment.yml'
with:
environment: staging
remote_host: staging.atomicdata.dev
secrets: inherit
21 changes: 17 additions & 4 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
name: Deployment
name: Deployment (re-use)

on:
workflow_dispatch:
workflow_call:
inputs:
environment:
required: true
type: string
remote_host:
required: true
type: string
secrets:
REMOTE_USER:
required: true
SSH_PRIVATE_KEY:
required: true

jobs:
deploy:
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -25,13 +38,13 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rltgoDzvO"
SOURCE: "target/x86_64-unknown-linux-musl/release/atomic-server"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_HOST: ${{ inputs.remote_host }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ~/
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
host: ${{ inputs.remote_host }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
- Meta tags server side #577
- Include JSON-AD in initial response, speed up first render #511
- Remove feature to index external RDF files and search them #579
- Replace `acme_lib` with `instant-acme`, drop OpenSSL dependency, add DNS verification for TLS option with `--https-dns` #192
- Add staging environment #588
- Add systemd instructions to readme #271

## [v0.34.0] - 2022-10-31

Expand Down
13 changes: 12 additions & 1 deletion CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Check out the [Roadmap](https://docs.atomicdata.dev/roadmap.html) if you want to

- [Table of contents](#table-of-contents)
- [Running locally](#running-locally)
- [Cross compilation](#cross-compilation)
- [IDE setup (VSCode)](#ide-setup-vscode)
- [Testing](#testing)
- [Code coverage](#code-coverage)
Expand Down Expand Up @@ -45,6 +46,16 @@ Since `atomic-server` is developed in conjunction with the typescript / react `a
- Visit your `localhost` in your locally running `atomic-data-browser` instance: (e.g. `http://localhost:8080/app/show?subject=http%3A%2F%2Flocalhost`)
- use `cargo watch -- cargo run` to automatically recompile `atomic-server` when you push new assets using `pmpm build-server` in `atomic-data-browser`. This can be useful if you're debugging specific features that you can't reproduce while the front-end is hosted in vite.

## Cross compilation

If you want to build `atomic-server` for some other target (e.g. building for linux from macOS), you can use the `cross` crate.

```sh
cargo install cross
# make sure docker is running!
cross build --target x86_64-unknown-linux-musl --bin atomic-server --release
```

## IDE setup (VSCode)

This project is primarily being developed in VSCode.
Expand Down Expand Up @@ -219,7 +230,7 @@ or:
or do it manually:

1. `cd server`
1. `cargo build --release --target x86_64-unknown-linux-gnu`
1. `cargo build --release --target x86_64-unknown-linux-musl --bin atomic-server` (if it fails, use cross, see above)
1. `scp ../target/x86_64-unknown-linux-gnu/release/atomic-server atomic:~/atomic/server/atomic-server-v0.{version}`
1. `ssh atomic` (@joepio manages server)
2. `service atomic restart`
Expand Down
Loading