-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (54 loc) · 1.48 KB
/
build_master.yaml
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
name: Build-Deploy-Npm
on:
push:
branches:
- 'main'
paths-ignore:
- package.json
jobs:
build-and-push-to-npm:
permissions:
contents: write
issues: write
pull-requests: write
packages: write
name: Bygg og push
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
registry-url: "https://npm.pkg.github.com"
- name: Prepare repository
run: git checkout "${GITHUB_REF:11}"
- name: Installer dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
run: |
yarn
yarn build
- name: Login
run: |
git config user.email "[email protected]"
git config user.name "Team familie"
git remote set-url origin https://github-actions[bot]:[email protected]/$GITHUB_REPOSITORY.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create a .npmrc file for the github package repository
uses: FerLuisxd/create-npmrc@3
with:
org_name: navikt
env:
AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Push
run: |
yarn deploy-storybook
npm run publish:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}