update and add workflow to automatically run npm run build

This commit is contained in:
Martin Raifer 2022-07-22 12:25:55 +02:00
parent e6c4e2ae39
commit 4718d1b849
No known key found for this signature in database
GPG key ID: 3CD561F7B1C461BD
4 changed files with 45 additions and 7 deletions

View file

@ -8,7 +8,7 @@ jobs:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true

38
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: Deploy
permissions:
contents: write
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'Deploy') && github.repository == 'openstreetmap/id-tagging-schema'"
steps:
- name: Checkout
uses: actions/checkout@v3 # If you're using actions/checkout@v3 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Node.js dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
BRANCH: main # The branch the action should deploy to.
FOLDER: . # The folder the action should deploy.
CLEAN: false # Automatically remove deleted files from the deploy branch

View file

@ -5,9 +5,9 @@ jobs:
name: Check for code formatting mistakes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
- run: npm install
- run: npm run lint

View file

@ -15,12 +15,12 @@ jobs:
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: ['18']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install