Skip to content

fixed missing export in upload_github.js #229

fixed missing export in upload_github.js

fixed missing export in upload_github.js #229

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 20
- uses: actions/cache@v3
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: ssh tunnel to mysql database
run: |
mkdir -p ~/.ssh/
ssh-keyscan -H ara.uberspace.de >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{secrets.SSH_PRIVATE_KEY}}"
ssh -fN -L 3306:127.0.0.1:3306 [email protected]
ssh -fN -L 5432:127.0.0.1:5432 [email protected]
- name: Install
run: npm install
- run: printf "${{ secrets.ENV_LOCAL }}" >> .env.local
- name: Build
run: npm run build
- name: zip
run: zip -r build.zip .next
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: build-data
path: build.zip
deploy-beta:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-data
- name: ssh tunnel for upload
run: |
mkdir -p ~/.ssh/
ssh-keyscan -H ara.uberspace.de >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{secrets.SSH_PRIVATE_KEY}}"
ssh -fN -L 3306:127.0.0.1:3306 [email protected]
ssh -fN -L 5432:127.0.0.1:5432 [email protected]
- name: upload
run: |
ssh-keyscan -H ara.uberspace.de >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{secrets.SSH_PRIVATE_KEY}}"
scp build.zip [email protected]:~/html/HEAD/
- name: unzip
run: |
ssh-keyscan -H ara.uberspace.de >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{secrets.SSH_PRIVATE_KEY}}"
ssh [email protected] 'rm -rf ~/html/HEAD/.next'
ssh [email protected] 'unzip -d ~/html/HEAD/ ~/html/HEAD/build.zip'
- name: restart
run: |
ssh-keyscan -H ara.uberspace.de >> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{secrets.SSH_PRIVATE_KEY}}"
ssh [email protected] 'supervisorctl stop beta'
ssh [email protected] '/home/duostori/html/kill_rouge_workers.py'
ssh [email protected] '/home/duostori/html/kill_port_users.py beta'
ssh [email protected] 'supervisorctl start beta'