From 45af7f461437e970bfe580a834ee9b64ab722cdc Mon Sep 17 00:00:00 2001 From: Lea Rosema Date: Sat, 19 Oct 2024 20:08:28 +0200 Subject: [PATCH 1/5] Create deploy.yml --- .github/workflows/deploy.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e879084 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,49 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From f930466123af80204976cea38b3c3c33b3773826 Mon Sep 17 00:00:00 2001 From: Lea Rosema Date: Sat, 19 Oct 2024 20:17:52 +0200 Subject: [PATCH 2/5] chore: rename demo to docs, set node to lts version --- .nvmrc | 2 +- .sissi.config.js | 4 ++-- {demo => docs}/_data/meta.js | 0 {demo => docs}/_includes/footer.html | 0 {demo => docs}/_includes/header.html | 0 {demo => docs}/_includes/nav.html | 0 {demo => docs}/_layouts/base.html | 0 {demo => docs}/configuration.md | 0 {demo => docs}/css/_globals.css | 0 {demo => docs}/css/_reset.css | 0 {demo => docs}/css/_vars.css | 0 {demo => docs}/css/components/_footer.css | 0 {demo => docs}/css/components/_header.css | 0 {demo => docs}/css/components/_layout.css | 0 {demo => docs}/css/components/_nav.css | 0 {demo => docs}/css/styles.css | 0 {demo => docs}/css/utils/_auto-grid.css | 0 {demo => docs}/css/utils/_block-link.css | 0 {demo => docs}/css/utils/_breakpoints.css | 0 {demo => docs}/css/utils/_flow.css | 0 {demo => docs}/css/utils/_js.css | 0 {demo => docs}/css/utils/_prose.css | 0 {demo => docs}/css/utils/_vhidden.css | 0 {demo => docs}/css/utils/_wrapper.css | 0 {demo => docs}/data.md | 0 {demo => docs}/images/sissi.png | Bin {demo => docs}/imprint.md | 0 {demo => docs}/index.md | 0 {demo => docs}/templating.md | 0 {demo => docs}/test.md | 0 30 files changed, 3 insertions(+), 3 deletions(-) rename {demo => docs}/_data/meta.js (100%) rename {demo => docs}/_includes/footer.html (100%) rename {demo => docs}/_includes/header.html (100%) rename {demo => docs}/_includes/nav.html (100%) rename {demo => docs}/_layouts/base.html (100%) rename {demo => docs}/configuration.md (100%) rename {demo => docs}/css/_globals.css (100%) rename {demo => docs}/css/_reset.css (100%) rename {demo => docs}/css/_vars.css (100%) rename {demo => docs}/css/components/_footer.css (100%) rename {demo => docs}/css/components/_header.css (100%) rename {demo => docs}/css/components/_layout.css (100%) rename {demo => docs}/css/components/_nav.css (100%) rename {demo => docs}/css/styles.css (100%) rename {demo => docs}/css/utils/_auto-grid.css (100%) rename {demo => docs}/css/utils/_block-link.css (100%) rename {demo => docs}/css/utils/_breakpoints.css (100%) rename {demo => docs}/css/utils/_flow.css (100%) rename {demo => docs}/css/utils/_js.css (100%) rename {demo => docs}/css/utils/_prose.css (100%) rename {demo => docs}/css/utils/_vhidden.css (100%) rename {demo => docs}/css/utils/_wrapper.css (100%) rename {demo => docs}/data.md (100%) rename {demo => docs}/images/sissi.png (100%) rename {demo => docs}/imprint.md (100%) rename {demo => docs}/index.md (100%) rename {demo => docs}/templating.md (100%) rename {demo => docs}/test.md (100%) diff --git a/.nvmrc b/.nvmrc index 2bd5a0a..209e3ef 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -22 +20 diff --git a/.sissi.config.js b/.sissi.config.js index 7b09bc5..1d706f1 100644 --- a/.sissi.config.js +++ b/.sissi.config.js @@ -6,8 +6,8 @@ export default function(config) { config.addPlugin(css); return { dir: { - input: 'demo', + input: 'docs', output: 'dist' } } -} \ No newline at end of file +} diff --git a/demo/_data/meta.js b/docs/_data/meta.js similarity index 100% rename from demo/_data/meta.js rename to docs/_data/meta.js diff --git a/demo/_includes/footer.html b/docs/_includes/footer.html similarity index 100% rename from demo/_includes/footer.html rename to docs/_includes/footer.html diff --git a/demo/_includes/header.html b/docs/_includes/header.html similarity index 100% rename from demo/_includes/header.html rename to docs/_includes/header.html diff --git a/demo/_includes/nav.html b/docs/_includes/nav.html similarity index 100% rename from demo/_includes/nav.html rename to docs/_includes/nav.html diff --git a/demo/_layouts/base.html b/docs/_layouts/base.html similarity index 100% rename from demo/_layouts/base.html rename to docs/_layouts/base.html diff --git a/demo/configuration.md b/docs/configuration.md similarity index 100% rename from demo/configuration.md rename to docs/configuration.md diff --git a/demo/css/_globals.css b/docs/css/_globals.css similarity index 100% rename from demo/css/_globals.css rename to docs/css/_globals.css diff --git a/demo/css/_reset.css b/docs/css/_reset.css similarity index 100% rename from demo/css/_reset.css rename to docs/css/_reset.css diff --git a/demo/css/_vars.css b/docs/css/_vars.css similarity index 100% rename from demo/css/_vars.css rename to docs/css/_vars.css diff --git a/demo/css/components/_footer.css b/docs/css/components/_footer.css similarity index 100% rename from demo/css/components/_footer.css rename to docs/css/components/_footer.css diff --git a/demo/css/components/_header.css b/docs/css/components/_header.css similarity index 100% rename from demo/css/components/_header.css rename to docs/css/components/_header.css diff --git a/demo/css/components/_layout.css b/docs/css/components/_layout.css similarity index 100% rename from demo/css/components/_layout.css rename to docs/css/components/_layout.css diff --git a/demo/css/components/_nav.css b/docs/css/components/_nav.css similarity index 100% rename from demo/css/components/_nav.css rename to docs/css/components/_nav.css diff --git a/demo/css/styles.css b/docs/css/styles.css similarity index 100% rename from demo/css/styles.css rename to docs/css/styles.css diff --git a/demo/css/utils/_auto-grid.css b/docs/css/utils/_auto-grid.css similarity index 100% rename from demo/css/utils/_auto-grid.css rename to docs/css/utils/_auto-grid.css diff --git a/demo/css/utils/_block-link.css b/docs/css/utils/_block-link.css similarity index 100% rename from demo/css/utils/_block-link.css rename to docs/css/utils/_block-link.css diff --git a/demo/css/utils/_breakpoints.css b/docs/css/utils/_breakpoints.css similarity index 100% rename from demo/css/utils/_breakpoints.css rename to docs/css/utils/_breakpoints.css diff --git a/demo/css/utils/_flow.css b/docs/css/utils/_flow.css similarity index 100% rename from demo/css/utils/_flow.css rename to docs/css/utils/_flow.css diff --git a/demo/css/utils/_js.css b/docs/css/utils/_js.css similarity index 100% rename from demo/css/utils/_js.css rename to docs/css/utils/_js.css diff --git a/demo/css/utils/_prose.css b/docs/css/utils/_prose.css similarity index 100% rename from demo/css/utils/_prose.css rename to docs/css/utils/_prose.css diff --git a/demo/css/utils/_vhidden.css b/docs/css/utils/_vhidden.css similarity index 100% rename from demo/css/utils/_vhidden.css rename to docs/css/utils/_vhidden.css diff --git a/demo/css/utils/_wrapper.css b/docs/css/utils/_wrapper.css similarity index 100% rename from demo/css/utils/_wrapper.css rename to docs/css/utils/_wrapper.css diff --git a/demo/data.md b/docs/data.md similarity index 100% rename from demo/data.md rename to docs/data.md diff --git a/demo/images/sissi.png b/docs/images/sissi.png similarity index 100% rename from demo/images/sissi.png rename to docs/images/sissi.png diff --git a/demo/imprint.md b/docs/imprint.md similarity index 100% rename from demo/imprint.md rename to docs/imprint.md diff --git a/demo/index.md b/docs/index.md similarity index 100% rename from demo/index.md rename to docs/index.md diff --git a/demo/templating.md b/docs/templating.md similarity index 100% rename from demo/templating.md rename to docs/templating.md diff --git a/demo/test.md b/docs/test.md similarity index 100% rename from demo/test.md rename to docs/test.md From 9a74ffee4a1e33c89e84216e445e403507b9c118 Mon Sep 17 00:00:00 2001 From: Lea Rosema Date: Sat, 19 Oct 2024 20:21:39 +0200 Subject: [PATCH 3/5] fix: fix tests --- tests/resolver.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/resolver.test.js b/tests/resolver.test.js index 98bed6e..e59f8b9 100644 --- a/tests/resolver.test.js +++ b/tests/resolver.test.js @@ -13,7 +13,7 @@ describe('resolve', () => { before(() => { config = new SissiConfig({ dir: { - input: 'demo', + input: 'docs', output: 'dist', } }); From ff28331387d0cada7535e4557e32fe8aae28b4de Mon Sep 17 00:00:00 2001 From: Lea Rosema Date: Sat, 19 Oct 2024 20:40:07 +0200 Subject: [PATCH 4/5] fix: add nojekyll dot file --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e879084..468e9f6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,13 +36,14 @@ jobs: with: node-version: 20 - name: Build - run: npm run build + run: | + npm run build + touch dist/.nojekyll - name: Setup Pages uses: actions/configure-pages@v5 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - # Upload entire repository path: 'dist' - name: Deploy to GitHub Pages id: deployment From 7c88bab8f3c75a6546fbc4d2b183427585190817 Mon Sep 17 00:00:00 2001 From: Lea Rosema Date: Sat, 19 Oct 2024 20:40:29 +0200 Subject: [PATCH 5/5] fix: make it work with gh-pages --- docs/_includes/header.html | 2 +- docs/_layouts/base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 745ca44..33db03f 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -1,5 +1,5 @@
- Logo + Logo sissi diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html index ac4f42c..3a8e478 100644 --- a/docs/_layouts/base.html +++ b/docs/_layouts/base.html @@ -4,7 +4,7 @@ {{ title }} – Sissi Demo Site - +