File tree Expand file tree Collapse file tree 2 files changed +40
-9
lines changed Expand file tree Collapse file tree 2 files changed +40
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Deploy to Github Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master # Here source code branch is `master`, it could be other branch
7
+
8
+ jobs :
9
+ build_and_deploy :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ # Use GitHub Actions' cache to cache dependencies on servers
15
+ - uses : actions/cache@v4
16
+ with :
17
+ path : |
18
+ .asdf/**
19
+ vendor/bundle
20
+ key : ${{ runner.os }}-cache-${{ hashFiles('**/cache.key') }}
21
+ restore-keys : |
22
+ ${{ runner.os }}-cache-
23
+
24
+ # Use GitHub Deploy Action to build and deploy to Github
25
+ # For latest version: `jeffreytse/jekyll-deploy-action@master`
26
+ -
uses :
jeffreytse/[email protected]
27
+ with :
28
+ provider : " github" # Default is github
29
+ token : ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT)
30
+ branch : " master" # Default is gh-pages for github provider
31
+ jekyll_src : " ./" # Default is root directory
32
+ jekyll_cfg : " _config.yml" # Default is _config.yml
Original file line number Diff line number Diff line change @@ -2,19 +2,18 @@ name: Jekyll Action CI
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [master]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [master]
8
8
9
9
jobs :
10
10
build :
11
-
12
11
runs-on : ubuntu-latest
13
12
14
13
steps :
15
- - uses : actions/checkout@v2
16
- - name : Build the site in the jekyll/builder container
17
- run : |
18
- docker run \
19
- -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
20
- jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
14
+ - uses : actions/checkout@v2
15
+ - name : Build the site in the jekyll/builder container
16
+ run : |
17
+ docker run \
18
+ -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
19
+ jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
You can’t perform that action at this time.
0 commit comments