From 49a0b54933cc0bad67e2e2b1a45a43709a234e98 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Thu, 27 Nov 2025 21:59:30 +0900 Subject: [PATCH] Build and deploy Pages with actions, allowing you to preview them in artifacts --- .github/dependabot.yml | 11 ++++++ .github/workflows/build-and-deploy.yml | 46 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-and-deploy.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..90e05c40 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 00000000..dfcfab68 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,46 @@ +name: Build and deploy GitHub Pages + +on: + push: + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Build + uses: actions/jekyll-build-pages@v1 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + retention-days: 7 + + deploy: + + needs: build + + runs-on: ubuntu-24.04 + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + if: github.ref == 'refs/heads/master' + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4