Skip to content

Deploy

Deploy #344

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
schedule:
- cron: '0 3 * * *' # Every day at 3am
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout main branch
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Build gatsby pages (james.lu)
run: npm run build
env:
MONGODB_CONN_STRING: ${{ secrets.MONGODB_CONN_STRING }}
- name: Move to web directory
run: rm -rf ~/personal-website/public; cp -r ./public ~/personal-website
- name: Build gatsby pages (jame.lu)
run: npm run build
env:
MONGODB_CONN_STRING: ${{ secrets.MONGODB_CONN_STRING }}
GATSBY_SINGULAR: 1
- name: Move to web directory
run: rm -rf ~/personal-website-s/public; cp -r ./public ~/personal-website-s