add readme #2
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
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: generate envfile | |
uses: SpicyPizza/create-envfile@v1.3 | |
with: | |
envkey_NEBOLIVE_TOKEN: ${{ secrets.NEBOLIVE_TOKEN }} | |
envkey_NEBOLIVE_CODE: ${{ secrets.NEBOLIVE_CODE }} | |
directory: ./ | |
file_name: .env | |
fail_on_empty: true | |
- name: get last updates | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
username: ${{ secrets.SSH_USER }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
source: "./" | |
target: "~/station-skills" | |
- name: build and start project | |
uses: appleboy/ssh-action@v0.1.7 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
username: ${{ secrets.SSH_USER }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
script: | | |
cd station-skills | |
docker compose down | |
docker compose pull | |
docker compose up -d |