diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3b3c776 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +name: Build and Deploy + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + working-directory: app + + - name: Copy web res dist file to '/dist/res' + run: | + mkdir -p dist/res + cp -r ../dist/* dist/res/ + working-directory: app + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.16' + + - name: Build Server + run: | + go build -o dist/Yunhan.exe Yunhan.go + working-directory: app + + - name: Log __dirname + run: echo "Directory: $(pwd)" + working-directory: app