diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..fdd60414 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: Publish docs to GitHub pages + +on: + push: + branches: + - master + +# 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: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install dependencies + run: npm ci + - name: Build docs + run: npm run build:docs + + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './build-docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/eleventy.yml b/.github/workflows/eleventy.yml deleted file mode 100644 index cce6dfc5..00000000 --- a/.github/workflows/eleventy.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build Eleventy - -on: - push: - branches: - - master - -jobs: - build: - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies & build - run: | - npm install - grunt - grunt builddocs - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - publish_dir: ./build-docs - github_token: ${{ secrets.GITHUB_TOKEN }} - cname: tom-select.js.org