Add GitHub Actions workflow for Node.js build and deployment
This commit is contained in:
parent
ce0ed49700
commit
760dc2bfd7
1 changed files with 33 additions and 0 deletions
33
site/.forgejo/workflows/node.yaml
Normal file
33
site/.forgejo/workflows/node.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: GBCI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: gbo
|
||||
|
||||
steps:
|
||||
- name: Disable SSL verification (temporary)
|
||||
run: git config --global http.sslVerify false
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies and build
|
||||
run: |
|
||||
pnpm i
|
||||
pnpm run build
|
||||
|
||||
- name: Deploy to production
|
||||
run: |
|
||||
sudo rm -rf /opt/gbo/websites/docs.pragmatismo.com.br/*
|
||||
sudo cp -r ./out/. /opt/gbo/websites/docs.pragmatismo.com.br/
|
Loading…
Add table
Reference in a new issue