Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |