Skip to content

Commit 321e4fb

Browse files
committed
repair the ci deploy
1 parent 7bb638b commit 321e4fb

File tree

1 file changed

+47
-93
lines changed

1 file changed

+47
-93
lines changed

.github/workflows/ci-master.yml

Lines changed: 47 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,62 @@
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.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
19
on:
210
push:
3-
branches:
4-
- master
5-
pull_request:
6-
branches:
7-
- master
11+
branches: ["main"]
812

9-
name: CI
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
1015

11-
jobs:
12-
jekyll-build:
13-
name: Build (jekyll gem)
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
jekyll-version: [3.9, 4.3]
18-
os: [ ubuntu-latest, macos-latest, windows-latest ]
19-
ruby-version: ["3.0", "3.1", "3.2"]
20-
runs-on: ${{ matrix.os }}
21-
steps:
22-
- uses: actions/checkout@v4
23-
- name: Setup Ruby ${{ matrix.ruby-version }}
24-
uses: ruby/setup-ruby@v1
25-
with:
26-
ruby-version: ${{ matrix.ruby-version }}
27-
bundler-cache: false
28-
- name: Bundle Install (Jekyll ${{ matrix.jekyll-version }})
29-
run: bundle install
30-
env:
31-
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
32-
- name: Init Search
33-
run: bundle exec rake search:init
34-
env:
35-
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
36-
- name: Build Site
37-
run: bundle exec jekyll build
38-
env:
39-
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
4021

41-
github-pages-build:
42-
name: Build (github-pages gem)
43-
runs-on: ubuntu-latest
44-
steps:
45-
- uses: actions/checkout@v4
46-
- name: Setup Ruby
47-
uses: ruby/setup-ruby@v1
48-
with:
49-
ruby-version: "3.2"
50-
bundler-cache: false
51-
- name: Bundle Install
52-
run: bundle install
53-
env:
54-
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
55-
- name: Build Site
56-
run: bundle exec jekyll build
57-
env:
58-
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
22+
# Allow one concurrent deployment
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: true
5926

60-
validate:
61-
name: Validate HTML
62-
strategy:
63-
fail-fast: false
64-
matrix:
65-
ruby-version: ["3.2"]
27+
jobs:
28+
# Build job
29+
build:
6630
runs-on: ubuntu-latest
67-
6831
steps:
69-
- uses: actions/checkout@v4
70-
- name: Setup Ruby ${{ matrix.ruby-version }}
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Setup Ruby
7135
uses: ruby/setup-ruby@v1
7236
with:
73-
ruby-version: ${{ matrix.ruby-version }}
37+
ruby-version: "3.3"
7438
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
7539
cache-version: 0 # Increment this number if you need to re-download cached gems
76-
- name: Cache HTMLProofer
77-
id: cache-htmlproofer
78-
uses: actions/cache@v3
79-
with:
80-
path: tmp/.htmlproofer
81-
key: ${{ runner.os }}-htmlproofer
82-
- name: Build Site
83-
run: bundle exec jekyll build
84-
- name: Test with Nu Validator
85-
uses: Cyb3r-Jak3/html5validator-action@2a593a9f2c10593cbac84791a6fc4c47e9a106c8
86-
with:
87-
config: fixtures/html5validator-config.yml
88-
- name: Test with html-proofer
89-
run: bundle exec htmlproofer _site --ignore-urls "/github.com/,/web.archive.org/"
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v3
43+
- name: Build with Jekyll
44+
# Outputs to the './_site' directory by default
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
9046
env:
91-
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
92-
93-
assets:
94-
name: Test CSS and JS
47+
JEKYLL_ENV: production
48+
- name: Upload artifact
49+
# Automatically uploads an artifact from the './_site' directory by default
50+
uses: actions/upload-pages-artifact@v2
51+
52+
# Deployment job
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
9557
runs-on: ubuntu-latest
96-
97-
strategy:
98-
matrix:
99-
node-version: [18.x]
100-
58+
needs: build
10159
steps:
102-
- uses: actions/checkout@v4
103-
- name: Use Node.js ${{ matrix.node-version }}
104-
uses: actions/setup-node@v3
105-
with:
106-
node-version: ${{ matrix.node-version }}
107-
- run: npm install
108-
- run: npm test
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)