|
| 1 | +# Copyright 2025 The Ground Authors. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Sample workflow for building and deploying a Jekyll site to GitHub Pages |
| 16 | +name: Deploy Jekyll with GitHub Pages dependencies preinstalled |
| 17 | + |
| 18 | +on: |
| 19 | + # Runs on pushes targeting the default branch |
| 20 | + push: |
| 21 | + branches: ["master"] |
| 22 | + |
| 23 | + # Allows you to run this workflow manually from the Actions tab |
| 24 | + workflow_dispatch: |
| 25 | + |
| 26 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 27 | +permissions: |
| 28 | + contents: read |
| 29 | + pages: write |
| 30 | + id-token: write |
| 31 | + |
| 32 | +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
| 33 | +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
| 34 | +concurrency: |
| 35 | + group: "pages" |
| 36 | + cancel-in-progress: false |
| 37 | + |
| 38 | +jobs: |
| 39 | + # Build job |
| 40 | + build: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - name: Checkout |
| 44 | + uses: actions/checkout@v4 |
| 45 | + - name: Setup Pages |
| 46 | + uses: actions/configure-pages@v5 |
| 47 | + - name: Build with Jekyll |
| 48 | + uses: actions/jekyll-build-pages@v1 |
| 49 | + with: |
| 50 | + source: ./ |
| 51 | + destination: ./_site |
| 52 | + - name: Upload artifact |
| 53 | + uses: actions/upload-pages-artifact@v3 |
| 54 | + |
| 55 | + # Deployment job |
| 56 | + deploy: |
| 57 | + environment: |
| 58 | + name: github-pages |
| 59 | + url: ${{ steps.deployment.outputs.page_url }} |
| 60 | + runs-on: ubuntu-latest |
| 61 | + needs: build |
| 62 | + steps: |
| 63 | + - name: Deploy to GitHub Pages |
| 64 | + id: deployment |
| 65 | + uses: actions/deploy-pages@v4 |
0 commit comments