Skip to content

Commit 45892c7

Browse files
authored
Update deploy.yml
1 parent cd1a947 commit 45892c7

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,20 @@
1-
# This workflow will build and push a node.js application to an Azure Web App when a release is created.
2-
#
3-
# This workflow assumes you have already created the target Azure App Service web app.
4-
# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan
5-
#
6-
# To configure this workflow:
7-
#
8-
# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile.
9-
# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret
10-
#
11-
# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below).
12-
#
13-
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
14-
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
151
name: CD
162

173
on:
184
release:
195
types: [created]
206

21-
env:
22-
AZURE_WEBAPP_NAME: deserializerV2 # set this to your application's name
23-
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
24-
NODE_VERSION: '12.x' # set this to the node version to use
25-
267
jobs:
278
build-and-deploy:
289
name: Build and Deploy
2910
runs-on: ubuntu-latest
3011
steps:
3112
- uses: actions/checkout@v2
32-
- name: Use Node.js ${{ env.NODE_VERSION }}
33-
uses: actions/setup-node@v1
34-
with:
35-
node-version: ${{ env.NODE_VERSION }}
36-
- name: npm install, build, and test
37-
run: |
38-
npm ci
39-
npm run build --if-present
40-
- name: 'Deploy to Azure WebApp'
41-
uses: azure/webapps-deploy@v2
13+
- name: Build and push Docker images
14+
uses: docker/[email protected]
4215
with:
43-
app-name: ${{ env.AZURE_WEBAPP_NAME }}
44-
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
45-
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
16+
# Username used to log in to a Docker registry. If not set then no login will occur
17+
username: huangtingluo
18+
password: ${{secrets.DOCKER_ACCESS_TOKEN}}
19+
repository: huangtingluo/binary-json-formatter
20+
tags: release

0 commit comments

Comments
 (0)