Skip to content

Ci/cd

Ci/cd #3

Workflow file for this run

name: CD
on:
pull_request:
types: [closed]
branches:
- main
- staging
- development
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Check out the repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Build development
if: github.base_ref == 'development'
run: npm run build -- --mode development
- name: Build staging
if: github.base_ref == 'staging'
run: npm run build -- --mode staging
- name: Build production
if: github.base_ref == 'main'
run: npm run build -- --mode production
- name: Deploy to development
if: github.base_ref == 'development'
uses: OutlierVentures/arweave-bundler@v0.3.2
with:
command: upload
directory: dist/
private-key: ${{secrets.DEPLOY_KEY}}
network: arweave.net
- name: Deploy to staging
if: github.base_ref == 'staging'
uses: OutlierVentures/arweave-bundler@v0.3.2
with:
command: upload
directory: dist/
private-key: ${{secrets.DEPLOY_KEY}}
network: arweave.net
- name: Deploy to production
if: github.base_ref == 'main'
uses: OutlierVentures/arweave-bundler@v0.3.2
with:
command: upload
directory: dist/
private-key: ${{secrets.DEPLOY_KEY}}
network: arweave.net