Skip to content

Commit

Permalink
config: update workflows for deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
ludc-octo committed Mar 17, 2023
1 parent 6beff49 commit 2a46d4b
Show file tree
Hide file tree
Showing 8 changed files with 7,403 additions and 35,759 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build & Deploy

on:
push:
branches: [ "main" ]

pull_request:
branches: [ "main" ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Get Yarn cache directory
id: yarn-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- run: yarn build

- uses: a7ul/[email protected]
with:
command: c
cwd: "./"
files: |
dist/
captain-definition
outPath: deploy.tar

- name: Deploy App to CapRover
uses: caprover/[email protected]
with:
server: '${{ secrets.CAPROVER_SERVER }}'
app: '${{ secrets.APP_NAME }}'
token: '${{ secrets.APP_TOKEN }}'
26 changes: 0 additions & 26 deletions .github/workflows/lint.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

7 changes: 7 additions & 0 deletions captain-definition
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"schemaVersion": 2,
"dockerfileLines": [
"FROM socialengine/nginx-spa:latest",
"COPY ./dist /app"
]
}
Loading

0 comments on commit 2a46d4b

Please sign in to comment.