diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c7af3dd7..9bf0027a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -21,13 +21,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dotrun uses: canonical/install-dotrun@main - name: Install dependencies - run: dotrun install + run: | + sudo chmod -R 777 . + dotrun install - name: Build assets run: dotrun build diff --git a/.webpack/entry.js b/.webpack/entry.js index 5dbc9c6f..775aeb23 100644 --- a/.webpack/entry.js +++ b/.webpack/entry.js @@ -1,6 +1,5 @@ module.exports = { ['global-nav']: './static/js/src/global-nav.js', - ['cookie-policy']: './static/js/src/cookie-policy.js', ['latest-news']: './static/js/src/latest-news.js', ['tabbed-content.js']: './static/js/src/tabbed-content.js', }; diff --git a/package.json b/package.json index 4746efc5..68e16995 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "serve": "./entrypoint 0.0.0.0:${PORT}", "build-css": "sass static/sass/styles.scss static/css/styles.css --load-path=node_modules --style=compressed && postcss --no-map --use autoprefixer --replace 'static/css/**/*.css'", "build-js": "mkdir -p static/js && webpack", - "build": "mkdir -p static/js && webpack && yarn run build-css", + "build-cookie-policy": "cp node_modules/@canonical/cookie-policy/build/js/cookie-policy.js static/js/dist/", + "build": "mkdir -p static/js && webpack && yarn run build-css && yarn run build-cookie-policy", "start": "yarn run build && concurrently --kill-others --raw 'yarn run watch-css' 'yarn run watch-js' 'yarn run serve'", "test-js": "jest --passWithNoTests", "format-scss": "prettier -w 'static/**/*.scss'" @@ -46,9 +47,9 @@ "webpack": "5.76.0", "webpack-cli": "5.0.1" }, - "dependencies": { + "dependencies": { + "@canonical/cookie-policy": "^3.6.3", "@canonical/global-nav": "2.7.0", - "@canonical/cookie-policy": "3.5.0", "vanilla-framework": "3.15.1" } -} \ No newline at end of file +} diff --git a/static/js/src/cookie-policy.js b/static/js/src/cookie-policy.js deleted file mode 100644 index ad3a8253..00000000 --- a/static/js/src/cookie-policy.js +++ /dev/null @@ -1,3 +0,0 @@ -import { cookiePolicy } from '@canonical/cookie-policy'; - -cookiePolicy(); diff --git a/static/sass/styles.scss b/static/sass/styles.scss index 9cdda8bd..dcd131a3 100644 --- a/static/sass/styles.scss +++ b/static/sass/styles.scss @@ -28,9 +28,6 @@ @import 'pattern_heading-icon'; @import 'pattern_tabs'; -// import cookie policy -@import '@canonical/cookie-policy/build/css/cookie-policy'; - @include blog-p-list; @include blog-p-post; @include blog-p-card; diff --git a/templates/templates/base.html b/templates/templates/base.html index 921f965a..02a45277 100644 --- a/templates/templates/base.html +++ b/templates/templates/base.html @@ -13,6 +13,12 @@ + + + + -