forked from Shiloh/remnantchat
chore: set up ci and deploy workflows
This commit is contained in:
parent
16a4d29e03
commit
bce45f1efa
26
.github/workflows/ci.yml
vendored
Normal file
26
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
# - '!main'
|
||||
|
||||
jobs:
|
||||
test_and_build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: npm ci --no-optional
|
||||
- run: npm test
|
||||
|
||||
- name: 'Build web app artifacts'
|
||||
run: npm run build
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-output
|
||||
path: build
|
36
.github/workflows/deploy.yml
vendored
Normal file
36
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Deploy to Github Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deployment:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm i
|
||||
npm run build
|
||||
|
||||
# https://github.com/marketplace/actions/deploy-to-github-pages
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.DEPLOY_KEY }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: build
|
||||
CLEAN: true
|
||||
SINGLE_COMMIT: true
|
Loading…
Reference in New Issue
Block a user