Skip to content

Commit 512e513

Browse files
authored
Update pages.yml
1 parent ac53979 commit 512e513

File tree

1 file changed

+26
-43
lines changed

1 file changed

+26
-43
lines changed

.github/workflows/pages.yml

Lines changed: 26 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,48 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
1+
# .github/workflows/pages.yml
52

6-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7-
name: Deploy Jekyll site to Pages
3+
name: Build & Deploy Jekyll site to Pages
84

95
on:
10-
# Runs on pushes targeting the default branch
116
push:
12-
branches: ["master"]
7+
branches: ["master"] # or whatever your default branch is
8+
workflow_dispatch: # optional manual trigger
139

14-
# Allows you to run this workflow manually from the Actions tab
15-
workflow_dispatch:
16-
17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1810
permissions:
1911
contents: read
2012
pages: write
2113
id-token: write
2214

23-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25-
concurrency:
26-
group: "pages"
27-
cancel-in-progress: false
28-
2915
jobs:
30-
# Build job
31-
build:
16+
build-and-deploy:
3217
runs-on: ubuntu-latest
18+
environment:
19+
name: github-pages
20+
url: https://volovyk.dev
21+
3322
steps:
3423
- name: Checkout
3524
uses: actions/checkout@v4
36-
- name: Setup Ruby
37-
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
38-
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
25+
26+
- name: Setup Ruby & Install Gems
27+
uses: ruby/setup-ruby@v1
3928
with:
40-
ruby-version: '3.1' # Not needed with a .ruby-version file
41-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42-
cache-version: 0 # Increment this number if you need to re-download cached gems
43-
- name: Setup Pages
44-
id: pages
45-
uses: actions/configure-pages@v5
29+
ruby-version: "2.7.8" # pick any supported version
30+
bundler-cache: true
31+
32+
- name: Configure Pages
33+
uses: actions/configure-pages@v3
34+
4635
- name: Build with Jekyll
47-
# Outputs to the './_site' directory by default
48-
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
36+
run: bundle exec jekyll build --destination _site
4937
env:
5038
JEKYLL_ENV: production
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
PAGES_REPO_NWO: ${{ github.repository }}
41+
5142
- name: Upload artifact
52-
# Automatically uploads an artifact from the './_site' directory by default
53-
uses: actions/upload-pages-artifact@v3
43+
uses: actions/upload-pages-artifact@v1
44+
with:
45+
path: _site
5446

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:
6347
- name: Deploy to GitHub Pages
64-
id: deployment
65-
uses: actions/deploy-pages@v4
48+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)