Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/development_codepush-devml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - codepush-devml

on:
push:
branches:
- development
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: npm install, build, and test
working-directory: ./api
run: |
npm install
npm run build --if-present
npm run test --if-present

- name: Zip artifact for deployment
run: |
cd api
zip -r ../release.zip ./*

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: "codepush-devml"
slot-name: "Production"
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_24983D3EF8324CB0860C6EDAAC13D1DE }}
67 changes: 67 additions & 0 deletions .github/workflows/production_codepush-prodml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - codepush-prodml

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: npm install, build, and test
working-directory: ./api
run: |
npm install
npm run build --if-present
npm run test --if-present

- name: Zip artifact for deployment
run: |
cd api
zip -r ../release.zip ./*

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: "codepush-prodml"
slot-name: "Production"
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_PRODUCTION }}
90 changes: 90 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Maintaining Your Code-Push-Server Fork

This document outlines the process for keeping your fork of the code-push-server repository in sync with the official Microsoft repository.

## Initial Setup (Do Once)

1. **Fork the repository**

- Go to https://github.com/microsoft/code-push-server
- Click the "Fork" button in the top-right corner
- This creates a copy of the repository under your GitHub account

2. **Clone your fork to your local machine**

```
git clone https://github.com/YOUR-USERNAME/code-push-server.git
```

- This downloads your fork to your computer
- Replace `YOUR-USERNAME` with your GitHub username

3. **Navigate to the repository directory**

```
cd code-push-server
```

4. **Add the original repository as an "upstream" remote**

```
git remote add upstream https://github.com/microsoft/code-push-server.git
```

- `remote add`: Adds a new remote repository reference
- `upstream`: Common name used for the original repository
- The URL points to the original Microsoft repository

5. **Verify the remotes are set up correctly**
```
git remote -v
```
- Should show both `origin` (your fork) and `upstream` (original repo)

## Updating Your Fork (Do Periodically)

1. **Fetch all changes from the upstream repository**

```
git fetch upstream
```

- Downloads all changes from the original repository without merging them

2. **Switch to your main branch**

```
git checkout main
```

- Ensures you're on your main branch to receive the updates

3. **Merge the changes from upstream's main branch**

```
git merge upstream/main
```

- Integrates the original repository's changes into your local copy

4. **Push the updated main branch to your fork**
```
git push origin main
```
- Uploads the updated branch to your GitHub fork

## Working with Your Fork

- If you want to make your own changes, create a new branch from the updated main:

```
git checkout -b your-feature-branch
```

- After making changes, push your feature branch to GitHub:

```
git push origin your-feature-branch
```

- Always update your main branch from upstream before creating new feature branches to ensure you're working with the latest code.
Loading