From aa7bde4ec05a4110cdbddab84cd53b3d2bc0b2e5 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:04:32 +0100 Subject: [PATCH 1/6] deploy docs to github --- .github/workflows/deploy.docs.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/deploy.docs.yml diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml new file mode 100644 index 0000000..5f53cc2 --- /dev/null +++ b/.github/workflows/deploy.docs.yml @@ -0,0 +1,18 @@ +name: "deploy:docs to github" +on: [push] +# TODO: master +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: vuepress-deploy + uses: jenkey2011/vuepress-deploy@master + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + #TARGET_REPO: username/repo + #TARGET_BRANCH: master + BUILD_SCRIPT: npm install && npm docs:build + BUILD_DIR: build/docs/ \ No newline at end of file From 902ddadc024a86972fb2abd284b53ac86d32e246 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:08:16 +0100 Subject: [PATCH 2/6] use correct command --- .github/workflows/deploy.docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml index 5f53cc2..b920ff4 100644 --- a/.github/workflows/deploy.docs.yml +++ b/.github/workflows/deploy.docs.yml @@ -14,5 +14,5 @@ jobs: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} #TARGET_REPO: username/repo #TARGET_BRANCH: master - BUILD_SCRIPT: npm install && npm docs:build + BUILD_SCRIPT: npm install && npm run docs:build BUILD_DIR: build/docs/ \ No newline at end of file From 83207573640e3b185f986ae17356542ed2f3d797 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:12:28 +0100 Subject: [PATCH 3/6] try to use GITHUB_TOKEN --- .github/workflows/deploy.docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml index b920ff4..572f455 100644 --- a/.github/workflows/deploy.docs.yml +++ b/.github/workflows/deploy.docs.yml @@ -11,7 +11,7 @@ jobs: - name: vuepress-deploy uses: jenkey2011/vuepress-deploy@master env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} #TARGET_REPO: username/repo #TARGET_BRANCH: master BUILD_SCRIPT: npm install && npm run docs:build From c01967f1b9865cf8c1bdee0ae0b14ea7a985b4cc Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:17:22 +0100 Subject: [PATCH 4/6] test build docs workflow --- .github/file-filters.yml | 5 +++- .github/workflows/test.build.docs.yml | 34 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.build.docs.yml diff --git a/.github/file-filters.yml b/.github/file-filters.yml index eca0223..c01c353 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -7,4 +7,7 @@ frontend-test-unit-code: &frontend-test-unit-code - '**/*' frontend-test-build-code: &frontend-test-build-code - - '**/*' \ No newline at end of file + - '**/*' + +frontend-test-build-docs: &frontend-test-build-docs + - '**/*.md' \ No newline at end of file diff --git a/.github/workflows/test.build.docs.yml b/.github/workflows/test.build.docs.yml new file mode 100644 index 0000000..e342708 --- /dev/null +++ b/.github/workflows/test.build.docs.yml @@ -0,0 +1,34 @@ +name: "test:build test docs" + +on: push + +jobs: + # only (but most important) job from this workflow required for pull requests + # check results serve as run conditions for all other jobs here + files-changed: + name: Detect File Changes - frontend-test-build-docs + runs-on: ubuntu-latest + outputs: + changes: ${{ steps.changes.outputs.frontend-test-build-docs }} + steps: + - uses: actions/checkout@v3.3.0 + + - name: Check for frontend file changes + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-filters.yml + list-files: shell + + build: + if: needs.files-changed.outputs.changes == 'true' + name: Build Docs - Frontend + needs: files-changed + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Frontend | Build + run: npm install && npm run docs:build \ No newline at end of file From a6fbc9fc6c44c8c43544dd395faa6475b3e9c827 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:21:31 +0100 Subject: [PATCH 5/6] update readme, use fine graded permissions --- .github/workflows/test.lint.pr.yml | 5 +++-- README.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.lint.pr.yml b/.github/workflows/test.lint.pr.yml index 29ceeb1..727694d 100644 --- a/.github/workflows/test.lint.pr.yml +++ b/.github/workflows/test.lint.pr.yml @@ -7,8 +7,9 @@ on: - edited - synchronize -permissions: write-all -# pull-requests: write +permissions: + pull-requests: write + actions: write jobs: main: diff --git a/README.md b/README.md index b15fa89..91d6f0f 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ The following endpoints are provided given the right command is executed or all - [ ] chromatic - [ ] github actions - [ ] lint locales -- [ ] zähler -> pinia +- [ ] feature zähler -> pinia tore +- [ ] lint style (inline vue) stylelint? ## Known Problems From 43918b80e7fdf81f0f5bf1e5e2eb0d1531203a60 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 17:26:53 +0100 Subject: [PATCH 6/6] deploy docs only on master --- .github/workflows/deploy.docs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml index 572f455..3c0e251 100644 --- a/.github/workflows/deploy.docs.yml +++ b/.github/workflows/deploy.docs.yml @@ -1,6 +1,8 @@ name: "deploy:docs to github" -on: [push] -# TODO: master +on: + push: + branches: + - master jobs: build-and-deploy: runs-on: ubuntu-latest