diff --git a/.github/workflows/github-pages-www.yml b/.github/workflows/github-pages-www.yml new file mode 100644 index 000000000..e280f8968 --- /dev/null +++ b/.github/workflows/github-pages-www.yml @@ -0,0 +1,47 @@ +name: Build and deploy htmx.org to GitHub Pages + +on: + push: + branches: + - master + workflow_dispatch: + +concurrency: + cancel-in-progress: true + group: github-pages + +jobs: + deploy: + name: Build and deploy to GitHub Pages + runs-on: ubuntu-latest + environment: + name: github-pages + url: '${{ steps.deployment.outputs.page_url }}' + permissions: + contents: read + id-token: write + pages: write + steps: + - name: Check out repository + uses: actions/checkout@v5 + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Install Zola + uses: taiki-e/install-action@v2 + with: + tool: zola@0.19.1 + + - name: Build content + working-directory: ./www + run: zola build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + path: www/public + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4