-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.74 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: build and publish kommune
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
- run: npm update
- run: npm run download
- run: npm run transform
- 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: "artifacts.tar"
tag: v_${{ github.run_number }}
- name: Push to kommune
run: |
cd destinationRepo
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
git config --global --list
git stage .
git commit -m "Updated from kommune v_${{ github.run_number }}"
git branch --set-upstream-to master
git push https://$USERNAME:$REPO_KEY@github.com/artsdatabanken/kommune.git
env:
REPO_KEY: ${{secrets.PUSH_TOKEN}}
USERNAME: github-actions[bot]
- uses: actions/github-script@v6
name: Fyrer NiN
with:
github-token: ${{ secrets.PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'artsdatabanken',
repo: 'nin-data-lastejobb',
workflow_id: 'deploy.yml',
ref: 'master'
})