Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Archive Repo

Archive Repo #29

# File: .github/workflows/workflow.yml
on:
push:
branches:
- master
env:
AZURE_WEBAPP_NAME: tony-linkedin-login # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '10.x' # set this to the node version to use
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Build React client'
run: |
npm --prefix client install
yarn --cwd "client" run build
env:
REACT_APP_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }}
REACT_APP_REDIRECT_URI: ${{ secrets.LINKEDIN_OAUTH_REDIRECT_URL }}
- name: 'Build Express app'
run: |
npm install
npm run build --if-present
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.azureWebAppPublishProfile }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}