Skip to content

Commit

Permalink
Merge pull request #1795 from Artsdatabanken/main
Browse files Browse the repository at this point in the history
NiN-kart v2.0
  • Loading branch information
helemork authored Nov 21, 2023
2 parents eefa7bd + e2cfa24 commit 7c649cb
Show file tree
Hide file tree
Showing 191 changed files with 40,244 additions and 16,045 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: build and test PR

on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
- run: npm install --legacy-peer-deps
- run: npm run test
1 change: 1 addition & 0 deletions .github/workflows/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar czf $(basename $GITHUB_REPOSITORY).tar.gz -C build .
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build and publish

on:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install --legacy-peer-deps
- run: npm run build
- name: Check downloaded files
run: ./.github/workflows/filecheck.sh
- name: Checkout
uses: actions/checkout@v3
with:
path: "./destinationRepo"
token: ${{secrets.PUSH_TOKEN}}
- name: Run deployment script
run: ./.github/workflows/deploy.sh
shell: bash
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: ${{ github.event.repository.name }}.tar.gz
tag: v_${{ github.run_number }}
workflow_dispatch:
runs-on: ubuntu-latest
steps:
- name: Fyrer NiN
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT }}
repository: artsdatabanken/nin-kart
event-type: fra_nin-kart
2 changes: 2 additions & 0 deletions .github/workflows/filecheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ls -l temp
ls -l build
1 change: 1 addition & 0 deletions .github/workflows/slack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export curl -X POST -H 'Content-type: application/json' --data '{"text":"deploy nin-kart"}' $1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/
.vscode/
.vs/
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ if [ "${BRANCH}" == "test" ]
else
echo "This branch will not be deployed, since it's not the test branch."
fi
#Posting message to pull request in GitHub
#if [ "${TRAVIS_PULL_REQUEST}" != "false" ]
#then
#echo "Posting to github ..."
#curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST -d "{\"body\": \"${github_message}\"}" "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments"
#fi
Loading

0 comments on commit 7c649cb

Please sign in to comment.