-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds: - Deploy to prod github action (not tested yet) - Base path to properly route to apollo.volvox.tech/docs in prod
- Loading branch information
Showing
3 changed files
with
79 additions
and
13 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,63 @@ | ||
name: Build Image and Deploy API to Production | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: volvoxllc/volvox.apollo/docs | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=schedule | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Deploy to Droplet | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.VOLVOX_APOLLO_SSH_KEY }} | ||
script: | | ||
cd /opt/volvox | ||
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
docker compose up -d |
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,16 +1,19 @@ | ||
const withNextra = require("nextra")({ | ||
theme: "nextra-theme-docs", | ||
themeConfig: "./theme.config.tsx" | ||
theme: "nextra-theme-docs", | ||
themeConfig: "./theme.config.tsx" | ||
}) | ||
|
||
module.exports = withNextra({ | ||
// basePath: "/docs", | ||
content: [ | ||
"./pages/**/*.{js,jsx,ts,tsx,md,mdx}", | ||
"./components/**/*.{js,jsx,ts,tsx,md,mdx}" | ||
], | ||
eslint: { | ||
// Warning: This allows production builds to successfully complete even if your project has ESLint errors. | ||
ignoreDuringBuilds: true | ||
} | ||
// basePath: "/docs", | ||
content: [ | ||
"./pages/**/*.{js,jsx,ts,tsx,md,mdx}", | ||
"./components/**/*.{js,jsx,ts,tsx,md,mdx}" | ||
], | ||
eslint: { | ||
// Warning: This allows production builds to successfully complete even if your project has ESLint errors. | ||
ignoreDuringBuilds: true | ||
}, | ||
|
||
// Required to properly route to apollo.volvox.tech/docs. | ||
basePath: '/docs' | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.