Merge pull request #6 from Artsdatabanken/dependabot/npm_and_yarn/tmp… #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
workflow_dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fyrer NiN | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.PAT }} | |
repository: artsdatabanken/nin-data-lastejobb | |
event-type: fra_kommune |