Skip to content

Commit

Permalink
Fix: Update GitHub workflow (#962)
Browse files Browse the repository at this point in the history
* edit github workflow

* add trigger on feature branches

* break down npm install step

* install office package

* add package registry

* added package authentication

* rearrange steps

* add package authentication

* Fix indenting

* add authentication

* fix indentation

* fix typo

* Setup Node step again

* remove steps

* Setting package registry

* Add legacy peer deps

* list configs

* Delete .npmrc file

* Display location

* add bash

* set again

* remove config

* remove npmrc

* move to dev dependency

* add .npmrc file

* rearrange steps

* set github actions to creat .npmrc config

* remove npmrc

* add package registry

* add scoped package

* remove registry tag

* set officebrowserfeedbacknpm to specific package version

* set registry when installing from office

* install officebrowserfeedbacknpm globally

* upgrade to static-...-deploy v1

* add custom build command

* reset app_location

* add default file to build output folder

* remove custom build

* add augloop dependency

* move augloop up

* set always-auth=false

* move build and install steps out of builddeploy

* revert npmrc config

* consolidate config changes

* add scopes

* change registry order

* Set npm package registry

* trigger on dev only

Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
  • Loading branch information
ElinorW and thewahome committed May 24, 2021
1 parent cfdf70c commit 66dc22b
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 72 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/azure-static-web-apps-jolly-sand-0ac78c710.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,56 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
name: Checkout

- uses: actions/setup-node@v1.4.4
with:
node-version: 'v12.x'
registry-url: 'https://registry.npmjs.org/'
name: Set up Node

- name: Office Feedback package registry authentication
run: |
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/registry/:username=office
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/registry/:_password=NGh0NmRpY2M0N3B3N3dmM2hiM3plZXBveGRpcHNoeWEzejJjaGx1bGhtN2YyaWsyYnJ6YQ==
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/registry/:email=japethobalak@gmail.com
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/:username=office
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/:_password=NGh0NmRpY2M0N3B3N3dmM2hiM3plZXBveGRpcHNoeWEzejJjaGx1bGhtN2YyaWsyYnJ6YQ==
npm set //office.pkgs.visualstudio.com/_packaging/Office/npm/:email=japethobalak@gmail.com
- name: Install Office Feedback package
run: |
npm config set registry https://office.pkgs.visualstudio.com/_packaging/Office/npm/registry
npm install -g @ms-ofb/officebrowserfeedbacknpm@1.6.4
- name: Set npm package registry
run: |
npm config set always-auth=false
npm config set registry https://registry.npmjs.org
- name: Config list
run: npm config list

- name: Npm install
run: npm install

- name: Build
run: npm run build

- name: Build And Deploy
env:
REACT_APP_CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
id: builddeploy
uses: Azure/static-web-apps-deploy@v0.0.1-preview
uses: Azure/static-web-apps-deploy@v1
with:
skip_deploy_on_missing_secrets: true
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_SAND_0AC78C710 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
app_location: "build" # App source code path
app_artifact_location: "build" # Built app content directory - optional
skip_app_build: true
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down
5 changes: 4 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
registry=https://office.pkgs.visualstudio.com/_packaging/Office/npm/registry/
registry=https://registry.npmjs.org/

@ms-ofb:registry=https://office.pkgs.visualstudio.com/_packaging/Office/npm/registry/

always-auth=true

Expand All @@ -11,3 +13,4 @@ always-auth=true
//office.pkgs.visualstudio.com/_packaging/Office/npm/:_password=NGh0NmRpY2M0N3B3N3dmM2hiM3plZXBveGRpcHNoeWEzejJjaGx1bGhtN2YyaWsyYnJ6YQ==
//office.pkgs.visualstudio.com/_packaging/Office/npm/:email=japethobalak@gmail.com
; end auth token

103 changes: 37 additions & 66 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@azure/msal-browser": "2.12.0",
"@augloop/types-core": "2.16.189",
"@babel/core": "7.12.13",
"@babel/eslint-parser": "7.12.13",
"@microsoft/applicationinsights-react-js": "2.3.1",
Expand Down Expand Up @@ -147,4 +148,4 @@
"tslint-react": "4.0.0",
"yargs-parser": "13.1.2"
}
}
}

0 comments on commit 66dc22b

Please sign in to comment.