From 499732b86b69b06ccae5ca185e5d858eaeeeb87c Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 9 Oct 2022 12:54:51 +0100 Subject: [PATCH 1/2] Export wiki to pages for better SEO using Actions --- .github/workflows/pages.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000000..68805fe635 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,46 @@ +name: Publish WIKI to pages + +# Controls when the workflow will run +on: + # 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 one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup Node.js environment + uses: actions/setup-node@v3.5.0 + - name: checkout + uses: actions/checkout@v3 + with: + repository: 'atuline/WLED.wiki' + - name: show files + run: find ./ + - name: build docs + run: npm install -g github-wikito-converter && mkdir _site && gwtc --output _site/ --file-name index ./ + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + +# Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From ce52a50d2d1267199fc0c7c93db03c8a045b05df Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 9 Oct 2022 13:04:22 +0100 Subject: [PATCH 2/2] Run on push --- .github/workflows/pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 68805fe635..a345e3e274 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,6 +2,7 @@ name: Publish WIKI to pages # Controls when the workflow will run on: + push: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: