Skip to content
Open
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
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Packages & Docs

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

env:
DOCKER_REGISTRY: ghcr.io/alien-worlds
FILLER_FLAGS:

on:
push:
branches: [master]
pull_request:
branches: [master]
types: [closed]

jobs:
docker:
name: "Build Docker"
runs-on: ubuntu-latest
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
permissions:
contents: write
packages: write
pull-requests: read
steps:
- uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Building dependencies
run: docker compose run api yarn

- name: Pushing Images to Registry
run: docker compose push

- name: Generating OpenAPI definition
run: docker compose -f docker-compose.yml -f docker-compose.apigen.yml run apigen && docker compose down

- name: Deploying Redoc
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./openapi
publish_branch: docs

#TODO: Deploy API to Production
22 changes: 6 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: lint
name: Lint

concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches: [master]
branches: [master, develop]
pull_request:
branches: [master]

branches: [master, develop]
workflow_dispatch:

jobs:
lint:
docker:
name: "Build and Lint"
runs-on: ubuntu-latest
permissions:
actions: write
Expand Down Expand Up @@ -41,14 +41,4 @@ jobs:
run: docker compose run api yarn lint-es

- name: Running Prettier
run: docker compose run api yarn lint-prettier

- name: Generating OpenAPI definition
run: docker compose -f docker-compose.yml -f docker-compose.apigen.yml run apigen && docker compose down

- name: Generating Redoc
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DACOCOBOT_PAT }}
publish_dir: ./openapi
publish_branch: docs
run: docker compose run api yarn lint-prettier

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low-prio non-blocking nit-pick]

Suggested change
run: docker compose run api yarn lint-prettier
run: docker compose run api yarn lint-prettier