|
1 | | - |
2 | | -name: Jekyll site CI |
3 | | - |
4 | | -on: |
5 | | - pull_request: |
6 | | - branches: [ master, main ] |
7 | | - |
8 | | - |
9 | | -permissions: |
10 | | - contents: read |
11 | | - pages: write |
12 | | - id-token: write |
13 | | - |
14 | | -jobs: |
15 | | - build: |
16 | | - runs-on: ubuntu-latest |
17 | | - |
18 | | - steps: |
19 | | - - name: Checkout |
20 | | - uses: actions/checkout@v3 |
21 | | - with: |
22 | | - ref: ${{ github.event.inputs.branch }} |
23 | | - |
24 | | - - name: Setup Ruby |
25 | | - |
26 | | - with: |
27 | | - ruby-version: '3.1' |
28 | | - bundler-cache: true |
29 | | - cache-version: 0 |
30 | | - |
31 | | - - name: Setup Pages |
32 | | - id: pages |
33 | | - uses: actions/configure-pages@v2 |
34 | | - |
35 | | - - name: Install dependencies |
36 | | - run: | |
37 | | - bundle install |
38 | | -
|
39 | | - - name: Build with Jekyll |
40 | | - # Outputs to the './_site' directory by default |
41 | | - run: | |
42 | | - bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
43 | | - env: |
44 | | - PAGES_REPO_NWO: ${{ github.repository }} |
45 | | - JEKYLL_ENV: production |
46 | | - JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
47 | | - |
48 | | - - name: Upload artifact |
49 | | - uses: actions/upload-pages-artifact@v1 |
| 1 | +name: Jekyll site CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, master ] |
| 6 | + pull_request: |
| 7 | + branches: [ main, master ] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + pages: write |
| 13 | + id-token: write |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: ubuntu-24.04 |
| 18 | + steps: |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v4 |
| 21 | + with: |
| 22 | + ref: ${{ github.event.inputs.branch }} |
| 23 | + |
| 24 | + - name: Setup Ruby |
| 25 | + |
| 26 | + with: |
| 27 | + ruby-version: '3.3' |
| 28 | + bundler-cache: true |
| 29 | + cache-version: 0 |
| 30 | + |
| 31 | + - name: Setup Pages |
| 32 | + id: pages |
| 33 | + uses: actions/configure-pages@v5 |
| 34 | + |
| 35 | + - name: Install dependencies |
| 36 | + run: | |
| 37 | + bundle install |
| 38 | +
|
| 39 | + - name: Build with Jekyll |
| 40 | + # Outputs to the './_site' directory by default |
| 41 | + run: | |
| 42 | + bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
| 43 | + env: |
| 44 | + PAGES_REPO_NWO: ${{ github.repository }} |
| 45 | + JEKYLL_ENV: production |
| 46 | + JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + JEKYLL_BUILD_BRANCH: ${{ github.ref_name }} |
| 48 | + JEKYLL_BASE_PATH: ${{ steps.pages.outputs.base_path }} |
| 49 | + |
| 50 | + - name: Upload artifact |
| 51 | + uses: actions/upload-pages-artifact@v3 |
| 52 | + |
| 53 | + deploy: |
| 54 | + runs-on: ubuntu-24.04 |
| 55 | + needs: build |
| 56 | + |
| 57 | + if: | |
| 58 | + github.event_name == 'workflow_dispatch' || |
| 59 | + (github.event_name == 'push' && github.event.repository.default_branch == github.ref_name) |
| 60 | + concurrency: |
| 61 | + group: "pages" |
| 62 | + cancel-in-progress: true |
| 63 | + |
| 64 | + environment: |
| 65 | + name: github-pages |
| 66 | + url: ${{ steps.deployment.outputs.page_url }} |
| 67 | + |
| 68 | + steps: |
| 69 | + - name: Deploy to GitHub Pages |
| 70 | + id: deployment |
| 71 | + uses: actions/deploy-pages@v4 |
0 commit comments