Skip to content

Commit cbbc66a

Browse files
committed
Try modern upload example
1 parent f8524c5 commit cbbc66a

File tree

1 file changed

+15
-52
lines changed

1 file changed

+15
-52
lines changed

.github/workflows/deploy.yml

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,27 @@
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-
241
jobs:
252
# Build job
263
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
336

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
558
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
5618
environment:
5719
name: github-pages
5820
url: ${{ steps.deployment.outputs.page_url }}
21+
22+
# Specify runner + deployment step
5923
runs-on: ubuntu-latest
60-
needs: build
6124
steps:
6225
- name: Deploy to GitHub Pages
6326
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

Comments
 (0)