2aeb73370a
* feat: static site
* feat: mui support & basic theming
* feat: entgamers favicon
* feat: public images until dynamic content can be used
* feat: entgamers & gaming assets
* feat: eslint extra rules
* feat: mui theme modifications
* feat: fontawesome, gsap, bundle analyzer
* feat: common interfaces
* feat: basic layout
* chore: upadted dependencies
* chore: updated dependencies
* feat: updated link styles
* feat: layout now have better interfaces
* feat: basic seo component
* feat: static website
* feat: env variable rules in .gitignore
* feat: added lint to pre-commit
* docs: initial documentation
* ci: deploy using pm2
* ci: pm2 configuration file
* ci: github action deploy preview
* ci: github action deploy production
* ci: env variables now pass to pm2
* fix: pass environment to actions
* feat: post deploy as sudo
* fix: pass only required env to deploy
* revert: deploy as sudo
Refs: 624b225
* fix: server use isomorphic-fetch
* ci: use yarn instead npm
* fix: glass text contrast
* fix: production git ref
* docs: deploy env vars
* feat: setup github action to run on new server
* fix: github action naming
* fix: github action name, wrong triggers
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: CI setup preview
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
environment: preview
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: "16"
|
|
- name: Setup Host SSH
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
chmod 600 ~/.ssh/known_hosts
|
|
shell: bash
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
|
|
- name: Install pm2
|
|
run: npm install pm2 --location=global
|
|
shell: bash
|
|
- name: Deploy using pm2
|
|
run: pm2 deploy ecosystem.config.js preview setup
|
|
env:
|
|
# Deploy environment variables
|
|
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
|
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
|
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
|
# App environment variables
|
|
APP_NAME: ${{ secrets.APP_NAME }}
|
|
SITE_NAME: ${{ secrets.SITE_NAME }}
|
|
PORT: ${{ secrets.PORT }}
|
|
DISCORD_JOIN_WEBHOOK_URL: ${{ secrets.DISCORD_JOIN_WEBHOOK_URL }}
|
|
shell: bash
|