-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📦 Build JS assets in CI and gitignore them
The npm 'package' and the django staticfiles assets are exclusively to be built in the CI pipeline, and not kept in version control. This keeps a single source of truth and prevents us from forgetting to update the artifacts, at the cost of a little extra step for local development.
- Loading branch information
1 parent
7bdfc78
commit aa03286
Showing
7 changed files
with
69 additions
and
182 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
name: 'Build JS' | ||
description: 'Compile the TS source code' | ||
|
||
inputs: | ||
npm-package: | ||
description: Build NPM package | ||
required: false | ||
default: 'false' | ||
|
||
django-staticfiles: | ||
description: Bundle Django staticfiles | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'js/.nvmrc' | ||
cache: npm | ||
cache-dependency-path: js/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
shell: bash | ||
|
||
- name: Build NPM package | ||
if: ${{ inputs.npm-package == 'true' }} | ||
run: npm run build | ||
shell: bash | ||
working-directory: js | ||
|
||
- name: Build Django assets package | ||
if: ${{ inputs.django-staticfiles == 'true' }} | ||
run: npm run build:django-static | ||
shell: bash | ||
working-directory: js |
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
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
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
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
163 changes: 0 additions & 163 deletions
163
cookie_consent/static/cookie_consent/cookiebar.module.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.