From 07a601f431ee6a5d344028d79edbbb21a1a1f844 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Fri, 5 Jul 2024 17:35:05 +0900 Subject: [PATCH 1/3] ci: Rename workflow file / Use Ruby 3.3 --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/gh-pages.yml | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..d22ce7b325 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + bundler-cache: true + - name: Jekyll Build + run: bundle exec jekyll build + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + personal_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index db4ca8190e..0000000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: GitHub Pages Deploy -on: - push: - branches: - - main -jobs: - gh-pages-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2 - bundler-cache: true - - name: Jekyll Build - run: bundle exec jekyll build - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - personal_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_site From d76f76fcd38fbe6e331ccadac1727f9019cfe187 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Fri, 5 Jul 2024 17:37:26 +0900 Subject: [PATCH 2/3] Add `workflow_dispatch` --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d22ce7b325..a6b24abfb6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ on: push: branches: - main + workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest From af3e3a090992ef8c1238183baa0d424ed3084e08 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Fri, 5 Jul 2024 17:50:03 +0900 Subject: [PATCH 3/3] ci: Deploy pages with actions/deploy-pages --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a6b24abfb6..1f7839ffb9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,9 +4,14 @@ on: branches: - main workflow_dispatch: +concurrency: + group: "pages" + cancel-in-progress: false jobs: - deploy: + build: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v4 - name: Set up Ruby @@ -14,10 +19,23 @@ jobs: with: ruby-version: 3.3 bundler-cache: true + - name: Setup Pages + uses: actions/configure-pages@v5 - name: Jekyll Build run: bundle exec jekyll build - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - personal_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + deploy: + runs-on: ubuntu-latest + needs: build + # 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 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4