Skip to content

Commit

Permalink
feat: init deployment action PE-5161
Browse files Browse the repository at this point in the history
  • Loading branch information
fedellen committed Dec 6, 2023
1 parent c060653 commit 1310931
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [18.x, 20.x]
command: ["lint", "format", "build", "test"]
steps:
- uses: actions/checkout@v3

- name: Set Up node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: "yarn"

- name: Install dependencies
run: yarn --immutable --immutable-cache

- run: yarn ${{ matrix.command }}
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- PE-5161_deploy

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Up node
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "yarn"

- name: Install dependencies
run: yarn --immutable --immutable-cache

- name: Build
run: yarn build

- name: Deploy gh-pages if on prod
if: ${{ github.ref == 'refs/heads/PE-5161_deploy' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"type": "module",
"description": "ArDrive Turbo App",
"homepage": "https://ardriveapp.github.io/turbo-app",
"license": "AGPL-3.0-or-later",
"author": {
"name": "Permanent Data Solutions Inc",
Expand All @@ -14,7 +15,8 @@
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"preview": "vite preview"
"preview": "vite preview",
"test": "echo \"TODO: add tests\" && exit 0"
},
"dependencies": {
"@ardrive/turbo-sdk": "^1.1.0",
Expand Down

0 comments on commit 1310931

Please sign in to comment.