Skip to content

fix schematic migration (#93) #31

fix schematic migration (#93)

fix schematic migration (#93) #31

Workflow file for this run

name: deploy
on:
push:
branches:
- main
- master
workflow_dispatch:
inputs:
sync:
description: "File synchronization"
required: true
default: "delta"
jobs:
build-and-deploy:
name: Build and deploy CreateMod.com
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Set up node
uses: actions/setup-node@v4
- run: GOOS=linux CGO_ENABLED=0 go build -a -installsuffix cgo -o ./main ./cmd/server/main.go
- run: npm --prefix template install
- run: npm --prefix template run build
- name: "cleanup"
run: rm -rf .github
- run: rm -rf cmd
- run: rm -rf internal
- run: rm -rf migrations
- run: rm -rf model
- run: rm -rf query
- run: rm -rf server
- run: rm -rf template/node_modules
- run: rm .gitignore
- run: rm dev.Dockerfile
- run: rm docker-compose.yml
- run: rm Dockerfile
- run: rm go.mod
- run: rm go.sum
- run: rm npm.Dockerfile
- run: rm README.md
- name: "SFTP upload files"
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: "sftp"
remote-host: ${{secrets.SFTP}}
remote-user: ${{secrets.USERNAME}}
remote-port: ${{secrets.SFTP_PORT}}
remote-password: ${{secrets.PASSWORD}}
remote-path: "/"
sync: "full"
- name: restart
uses: outsparkled/[email protected]
with:
panel-url: ${{ secrets.PANEL_URL }}
server-id: ${{ secrets.SERVER_ID }}
bearer-token: ${{ secrets.BEARER_TOKEN }}
power-action: 'restart'