|
1 | | -name: GitHub Pages |
| 1 | +name: Deploy Jekyll site to Pages |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: |
6 | | - - master |
| 5 | + branches: ["master"] |
7 | 6 |
|
8 | | -jobs: |
9 | | - jekyll: |
10 | | - runs-on: ubuntu-latest |
11 | | - steps: |
12 | | - - name: setup |
13 | | - uses: actions/checkout@v2 |
14 | | - with: |
15 | | - fetch-depth: '0' |
| 7 | + workflow_dispatch: |
16 | 8 |
|
17 | | - - name: 💎 set up ruby |
18 | | - uses: ruby/setup-ruby@v1 |
19 | | - with: |
20 | | - ruby-version: 3.1 |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + pages: write |
| 12 | + id-token: write |
21 | 13 |
|
22 | | - # - name: set up Node.js |
23 | | - # run: sudo apt-get install nodejs |
| 14 | +concurrency: |
| 15 | + group: "pages" |
| 16 | + cancel-in-progress: false |
24 | 17 |
|
25 | | - - name: install dependencies & build site |
26 | | - uses: limjh16/jekyll-action-ts@v2 |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - name: Checkout |
| 23 | + uses: actions/checkout@v4 |
| 24 | + - name: Setup Ruby |
| 25 | + # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 |
| 26 | + uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 |
27 | 27 | with: |
28 | | - enable_cache: true |
| 28 | + ruby-version: '3.1' # Not needed with a .ruby-version file |
| 29 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 30 | + cache-version: 0 # Increment this number if you need to re-download cached gems |
| 31 | + - name: Setup Pages |
| 32 | + id: pages |
| 33 | + uses: actions/configure-pages@v5 |
| 34 | + - name: Build with Jekyll |
| 35 | + # Outputs to the './_site' directory by default |
| 36 | + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
| 37 | + env: |
| 38 | + JEKYLL_ENV: production |
| 39 | + - name: Upload artifact |
| 40 | + # Automatically uploads an artifact from the './_site' directory by default |
| 41 | + uses: actions/upload-pages-artifact@v3 |
29 | 42 |
|
30 | | - - name: deploy |
31 | | - uses: peaceiris/actions-gh-pages@v3 |
32 | | - with: |
33 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
34 | | - publish_dir: ./_site |
35 | | - publish_branch: gh-pages |
| 43 | + deploy: |
| 44 | + environment: |
| 45 | + name: github-pages |
| 46 | + url: ${{ steps.deployment.outputs.page_url }} |
| 47 | + runs-on: ubuntu-latest |
| 48 | + needs: build |
| 49 | + steps: |
| 50 | + - name: Deploy to GitHub Pages |
| 51 | + id: deployment |
| 52 | + uses: actions/deploy-pages@v5 |
0 commit comments