-
Notifications
You must be signed in to change notification settings - Fork 27
deploy web app to azure blob storage #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ce97d16
9e60018
647c4b3
ff31043
263018e
6f1105f
2a83969
18d75c6
fe43704
119bddb
512118c
63bb226
7d0357f
0304215
ac8575e
d5a0c8d
6aaa796
de90342
21b7e27
f9629e0
776e1e7
7821231
7b51ae0
40d41a2
70b65a4
33faa44
73f6e77
7ced44a
30b85fc
f619ddd
5d279b7
207d4cf
2f94912
53f012a
ee601e6
23025be
f6ed8c5
3b61fb1
9e5c8d2
b8e6e25
e225882
d970d43
765105f
067e8fb
f53ab20
f961f44
f885421
ac2395d
309e3c8
cd597fe
604711b
223bb54
d5f92ee
4c9795f
11c4bc9
ab95aeb
62bb56a
01370ba
07946fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# deploy to blob storage => | ||
name: Build and deploy the app to the Azure Blob Storage | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
env: | ||
AZURE_WEBAPP_PACKAGE_PATH: ui/react-ui | ||
NODE_VERSION: '10.x' | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: Set up Node.js version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{env.NODE_VERSION}} | ||
- name: npm install and build | ||
run: | | ||
cd ${{env.AZURE_WEBAPP_PACKAGE_PATH}} | ||
npm install | ||
npm run build | ||
- name: Upload To Azure Blob Storage | ||
uses: bacongobbler/[email protected] | ||
with: | ||
source_dir: ${{env.AZURE_WEBAPP_PACKAGE_PATH}}/build | ||
container_name: $web | ||
connection_string: ${{secrets.BLOB_STORAGE_CONNECTION_STRING}} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
.App { | ||
/* text-align: center; */ | ||
/* height: 100vh; */ | ||
padding-top: 2rem; | ||
padding-bottom: 2rem; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ let UserSingleTask = () => { | |
console.log(userId, taskId) | ||
|
||
useEffect(() => { | ||
fetch(`https://nsc-functionsapp-team1.azurewebsites.net/api/users/${userId}/tasks/${taskId}`) | ||
fetch(`https://nsc-fun-dev-usw2-thursday.azurewebsites.net/api/users/${userId}/tasks/${taskId}`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
.then(response => response.json()) | ||
.then(data => setUserSingleTask(data)) | ||
.catch((error) => console.error(error)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ var UserTasks = () => { | |
useEffect(() => { | ||
setUserTasks(['loading']); | ||
|
||
fetch(`https://nsc-functionsapp-team1.azurewebsites.net/api/users/${userId}/tasks?`) | ||
fetch(`https://nsc-fun-dev-usw2-thursday.azurewebsites.net/api/users/${userId}/tasks?`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
.then(response => response.json()) | ||
.then(data => setUserTasks(data)) | ||
.catch((error) => console.error(error)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,15 @@ var User = () => { | |
var {userId} = useParams(); | ||
|
||
useEffect(() => { | ||
fetch(`https://nsc-functionsapp-team1.azurewebsites.net/api/users/${userId}?`) | ||
fetch(`https://nsc-fun-dev-usw2-thursday.azurewebsites.net/api/users/${userId}?`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
.then(response => response.json()) | ||
.then(data => setUser(data)) | ||
.then(data => { | ||
var updatedData = {}; | ||
|
||
if (Object.keys(data).length > 0) Object.keys(data).forEach(key => updatedData[key.toLowerCase()] = data[key]); | ||
|
||
setUser(updatedData); | ||
}) | ||
.catch((error) => console.error(error)) | ||
|
||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ export default class Users extends Component { | |
}; | ||
|
||
async componentDidMount() { | ||
const url = 'https://nsc-functionsapp-team1.azurewebsites.net/api/users'; | ||
const url = 'https://nsc-fun-dev-usw2-thursday.azurewebsites.net/api/users'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And thanks for updating users as well. |
||
const response = await fetch(url); | ||
const usersData = await response.json(); | ||
this.setState({ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good clean up.