Skip to content

Commit

Permalink
ci: add npm caching
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-karan committed Jul 1, 2024
1 parent b0f5a40 commit 0fd3838
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Cache node modules
uses: actions/cache@v3
with:
path: ./docs/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/docs/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: |
cd docs
npm install
- name: Build
run: |
cd docs
npm run build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ builds:
- -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})"
main: ./web/
hooks:
pre: sh -c 'cd ./docs/ && yarn build'
pre: sh -c 'cd ./docs/ && yarn && yarn build'

archives:
- id: cli
Expand Down

0 comments on commit 0fd3838

Please sign in to comment.