Skip to content

Commit 06c85f8

Browse files
committed
Add the deploy and PR GitHub workflows
The deploy one automatically deploys `main` to Azure. The PR one ensures that the test suite passes. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b298cc6 commit 06c85f8

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Deploy to Azure
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/deploy.yml'
9+
- 'GitGitGadget/**'
10+
11+
jobs:
12+
deploy:
13+
if: github.event.repository.fork == false
14+
environment: deploy-to-azure
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: Azure/functions-action@v1
19+
with:
20+
app-name: GitGitGadget
21+
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
22+
respect-funcignore: true

.github/workflows/pr.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/setup-node@v3
10+
with:
11+
node-version: 18
12+
- uses: actions/checkout@v3
13+
- name: npm install
14+
run: npm install
15+
- name: run ESLint
16+
run: npm run lint
17+
- name: run tests
18+
run: npm run test

0 commit comments

Comments
 (0)