-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
name: Deploy to Server | ||
# action trigger condition. You can read more from here <https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on> | ||
on: | ||
push: # you can remove unused branch names | ||
branches: | ||
- "main" | ||
- "master" | ||
- "release/*" | ||
- "production/*" | ||
release: # triggers on all release events. Remove this if you're not using it | ||
types: [published, created, edited] | ||
push: # you can remove unused branch names | ||
branches: | ||
- 'main' | ||
- 'master' | ||
- 'release/*' | ||
- 'production/*' | ||
release: # triggers on all release events. Remove this if you're not using it | ||
types: [published, created, edited] | ||
|
||
jobs: | ||
# build the source code | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Build App | ||
run: | | ||
yarn | ||
yarn build | ||
# deploy the build | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to Server | ||
run: echo "Please add the deploy behavior here" | ||
# build the source code | ||
build: | ||
name: Build Code | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: build | ||
run: | | ||
yarn | ||
yarn build | ||
working-directory: ./ | ||
# deploy the build | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to Server | ||
run: echo "Please add the deploy behavior here" |