Skip to content

Commit

Permalink
Add the deploy and PR GitHub workflows
Browse files Browse the repository at this point in the history
The deploy one automatically deploys `main` to Azure.

The PR one ensures that the test suite passes.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Aug 17, 2023
1 parent b298cc6 commit 06c85f8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy to Azure

on:
push:
branches:
- main
paths:
- '.github/workflows/deploy.yml'
- 'GitGitGadget/**'

jobs:
deploy:
if: github.event.repository.fork == false
environment: deploy-to-azure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Azure/functions-action@v1
with:
app-name: GitGitGadget
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
respect-funcignore: true
18 changes: 18 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR check

on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
- name: npm install
run: npm install
- name: run ESLint
run: npm run lint
- name: run tests
run: npm run test

0 comments on commit 06c85f8

Please sign in to comment.