|
1 | | -# Sample workflow for building and deploying a Jekyll site to GitHub Pages |
2 | | -name: Deploy Jekyll site to Pages |
3 | | - |
4 | | -on: |
5 | | - # Runs on pushes targeting the default branch |
6 | | - push: |
7 | | - branches: master |
8 | | - |
9 | | - # Allows you to run this workflow manually from the Actions tab |
10 | | - workflow_dispatch: |
11 | | - |
12 | | -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
13 | | -permissions: |
14 | | - contents: read |
15 | | - pages: write |
16 | | - id-token: write |
17 | | - |
18 | | -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
19 | | -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
20 | | -concurrency: |
21 | | - group: "pages" |
22 | | - cancel-in-progress: false |
23 | | - |
24 | 1 | jobs: |
25 | 2 | # Build job |
26 | 3 | build: |
27 | | - runs-on: ubuntu-latest |
28 | | - steps: |
29 | | - - name: Checkout |
30 | | - uses: actions/checkout@v3 |
31 | | - with: |
32 | | - submodules: "true" |
| 4 | + # <Not provided for brevity> |
| 5 | + # At a minimum this job should upload artifacts using actions/upload-pages-artifact |
33 | 6 |
|
34 | | - - name: Setup Ruby |
35 | | - uses: ruby/setup-ruby@v1 |
36 | | - with: |
37 | | - ruby-version: "2.7" # Not needed with a .ruby-version file |
38 | | - bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
39 | | - cache-version: 0 # Increment this number if you need to re-download cached gems |
40 | | - - uses: MatteoH2O1999/setup-python@v2 |
41 | | - with: |
42 | | - python-version: "2.7" |
43 | | - - name: Setup Pages |
44 | | - id: pages |
45 | | - uses: actions/configure-pages@v3 |
46 | | - - name: Build with Jekyll |
47 | | - run: bundle exec jekyll build |
48 | | - env: |
49 | | - JEKYLL_ENV: production |
50 | | - - name: Upload artifact |
51 | | - # Automatically uploads an artifact from the './_site' directory by default |
52 | | - uses: actions/upload-pages-artifact@v3 |
53 | | - |
54 | | - # Deployment job |
| 7 | + # Deploy job |
55 | 8 | deploy: |
| 9 | + # Add a dependency to the build job |
| 10 | + needs: build |
| 11 | + |
| 12 | + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment |
| 13 | + permissions: |
| 14 | + pages: write # to deploy to Pages |
| 15 | + id-token: write # to verify the deployment originates from an appropriate source |
| 16 | + |
| 17 | + # Deploy to the github-pages environment |
56 | 18 | environment: |
57 | 19 | name: github-pages |
58 | 20 | url: ${{ steps.deployment.outputs.page_url }} |
| 21 | + |
| 22 | + # Specify runner + deployment step |
59 | 23 | runs-on: ubuntu-latest |
60 | | - needs: build |
61 | 24 | steps: |
62 | 25 | - name: Deploy to GitHub Pages |
63 | 26 | id: deployment |
64 | | - uses: actions/deploy-pages@v2 |
| 27 | + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |
0 commit comments