Skip to content

reimplement links package's cache, fix some docs #17

reimplement links package's cache, fix some docs

reimplement links package's cache, fix some docs #17

Workflow file for this run

name: swis-api CI/CD pipeline
on:
push:
branches: [ master ]
jobs:
build:
runs-on: [ self-hosted, public, docker ]
steps:
- uses: actions/checkout@v3
- name: Build new swapi image (with staging).
env:
APP_URL: ${{ secrets.APP_URL }}
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
run: make build
test_deploy:
runs-on: [ self-hosted, public, docker ]
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Run test container and run end-to-end test on it.
env:
LOKI_URL: ${{ secrets.LOKI_URL }}
GIN_MODE: debug
run: make test_deploy e2e
dump_data:
runs-on: [ self-hosted, public, docker ]
needs: [ test_deploy ]
steps:
- uses: actions/checkout@v3
- name: Dump production data.
env:
APP_URL: ${{ secrets.APP_URL }}
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
run: make dump
prod_deploy:
runs-on: [ self-hosted, public, docker ]
needs: [ dump_data ]
steps:
- uses: actions/checkout@v3
- name: Deploy prod docker container, recreate container with fresh image.
env:
APP_ENVIRONMENT: production
APP_URL: ${{ secrets.APP_URL }}
LOKI_URL: ${{ secrets.LOKI_URL }}
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
GIN_MODE: ${{ secrets.GIN_MODE }}
run: make run
import_data:
runs-on: [ self-hosted, public, docker ]
needs: [ prod_deploy ]
steps:
- uses: actions/checkout@v3
- name: Import dumped data to production.
env:
APP_URL: ${{ secrets.APP_URL }}
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
run: make import_dump
generate_docs:
runs-on: [ self-hosted, public, docker ]
needs: [ prod_deploy ]
steps:
- uses: actions/checkout@v3
- name: (re)Generate interface API swagger docs.
env:
APP_URL: ${{ secrets.APP_URL }}
run: make docs